home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / internet / servu21.zip / SERV-U.TXT < prev    next >
Text File  |  1996-11-08  |  161KB  |  3,301 lines

  1.                               
  2.                               
  3.                               
  4.                          FTP Serv-U
  5.                               
  6.                               
  7.                 FTP-Server Daemon for WinSock
  8.                               
  9.                               
  10.                          Version 2.1
  11.                               
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                        **************
  19.                     The Serv-U Web site: 
  20.           All you ever wanted to know about Serv-U
  21.                 and always the latest version
  22.                               
  23.                    HTTP://www.cat-soft.com
  24.                        **************
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                          Revision 1
  31.                         November 1996
  32.                   c 1995, 1996 Rob Beckers
  33.                           Cat Soft
  34.  
  35.  
  36.  
  37.                               
  38.  
  39.                          DISCLAIMER
  40.                          ==========
  41.                               
  42. I  know, it's not the nicest way to start off. So let's  just
  43. get this part over with, OK?!
  44.  
  45. The  FTP  server  program Serv-U and  its  documentation  are
  46. copyright Rob Beckers. It is distributed as shareware, giving
  47. you  the  right  to try it for a period of 30  days.  If  you
  48. intend  to  use Serv-U after the initial try-out period,  you
  49. are obliged to pay the registration fee.
  50.  
  51. The next paragraph is a beautiful piece of prose. In just two
  52. sentences it says it all. Alas, with all the sue-happy people
  53. in  this world it is unfortunately necessary, so please  bear
  54. with me.
  55.  
  56. This software is provided by the regents and contributors 'as
  57. is' and any express or implied warranties, including, but not
  58. limited  to,  the  implied warranties of merchantability  and
  59. fitness for a particular purpose are disclaimed.  In no event
  60. shall  the regents or contributors be liable for any  direct,
  61. indirect,  incidental, special, exemplary,  or  consequential
  62. damages  (including,  but  not  limited  to,  procurement  of
  63. substitute goods or services; loss of use, data, or  profits;
  64. or business interruption) however caused and on any theory of
  65. liability,  whether  in contract, strict liability,  or  tort
  66. (including negligence or otherwise) arising in any way out of
  67. the  use of this software, even if advised of the possibility
  68. of such damage.
  69. Contents
  70.  
  71.  
  72. TABLE OF CONTENTS
  73. =================
  74.  
  75. Introduction                                               1
  76.  
  77. 1. Making It Work - Installation                           3
  78.   1.1 Installation                                         3
  79.   1.2 Network  Installation                                4
  80.   1.3 Command Line Options                                 4
  81.   1.4 Quick Setup                                          4
  82.   1.5 De-installation                                      5
  83.   1.6 Upgrading                                            5
  84.   1.6 Known Bugs & Problems                                6
  85.   1.7 A Word to the Wise (but paranoid)                    8
  86.  
  87. 2. Using Serv-U - How To .                                 9
  88.   2.1 How to Setup Your Server                             9
  89.   2.2 How to Add a User                                   10
  90.   2.3 How to Change a User                                13
  91.   2.4 How to Use Access Rules                             14
  92.   2.5 How to Setup Anonymous Access                       16
  93.   2.6 How to Use Groups                                   18
  94.   2.7 How to See Who is Logged In                         19
  95.   2.8 How to Kick a User Off the Server                   20
  96.   2.9 How to Setup Logging                                20
  97.   2.10 How to Use Sign-on and/or Sign-off Messages        21
  98.   2.11 How to Setup User Specific Login Messages          22
  99.   2.12 How to Use Directory Change Messages               23
  100.   2.13 How to Use Links à la UNIX                         24
  101.   2.14 How to Set Up Upload/Download Ratios               25
  102.   2.15 How to Limit Disk Usage of Users                   26
  103.   2.16 How to Limit Access by IP Number                   26
  104.   2.17 How to Print via FTP                               28
  105.   2.18 How to Execute Programs via FTP with Serv-U        28
  106.   2.19 How to Use Serv-U with 'SLIP/PPP Emulators'        29
  107.   2.20 How to use Netscape to access Serv-U               30
  108.   2.21 How to Let the Whole World into Your Server  
  109.        (and Delete All Your Files)                        30
  110.   2.22 How to use multi-homed IP support                  31
  111.  
  112. 3. The Inner Workings                                     32
  113.   3.1 Serv-U Internals                                    32
  114.   3.2 The SERV-U.INI File                                 33
  115.   3.3 Using External User Access Verification DLLs        40
  116.  
  117. 4. Getting In Touch - Bugs & Registration                 45
  118.   4.1 Serv-U Mailing List                                 45
  119.   4.2 Reporting Bugs                                      46
  120.   4.3 Registering Serv-U                                  46
  121.   4.4 Registration in the US                              47
  122.   4.5 Registration from Abroad                            47
  123.  
  124. Registration Form Serv-U                                  49
  125.  
  126.  
  127. INTRODUCTION
  128. ============
  129.  
  130. Thank you for giving this program a try!
  131.  
  132. With  Serv-U, your PC will be turned into a FTP server.  This
  133. means  that  others  on  the computer network  that  you  are
  134. connected to (Internet for most people) can access your PC to
  135. copy, move, make, and delete files and directories, using the
  136. FTP  protocol  (FTP = File Transfer Protocol). This  protocol
  137. dictates standard ways of communication between computers, so
  138. that  many  different  types  of computers,  using  different
  139. operating systems and file formats, can exchange files.
  140.  
  141. Serv-U  is  a  'server' program, also called a 'daemon'.  The
  142. term  daemon comes from ancient Greek mythology.  There,  the
  143. Daemons  were  half-gods, acting as  messengers  between  the
  144. people on earth and the gods. This FTP server acts, likewise,
  145. as a messenger for file transfer between FTP clients and your
  146. computer. Once started it sits in the background waiting  for
  147. a   client  to  contact  it  and  after  communications   are
  148. established, acting out the client's commands.
  149.  
  150. There  are  FTP  servers  (and clients)  for  many  different
  151. systems. This particular program is meant for PC's running MS-
  152. Windows  that  have  a WinSock version 1.1 compatible  TCP/IP
  153. stack installed.
  154.  
  155. Why  use  this  program and not one of  the  many  other  FTP
  156. servers that are available? For this I have to take you  back
  157. in time a little, to a little over two years ago. I needed  a
  158. FTP  server to make some files available to others and  tried
  159. out  a  number  of server programs. One simply  didn't  work.
  160. Another   would   work,  but  as  soon  as  someone   started
  161. transferring  a file from my PC it would lock  up  the  whole
  162. machine  until the transfer was complete. And then there  was
  163. one  that  worked  fine, but lacked all but  the  most  basic
  164. security. So, after endless frustration I decided to write my
  165. own, figuring it couldn't be that hard. As usual things got a
  166. bit  out  of  hand, but after a year and 11000 lines  of  C++
  167. there  was version 1.0. The current version, v2.1,  was  made
  168. two and a half years later, and consists of  over 22000 lines
  169. of code. I hope you like the result!
  170.  
  171. So what has this FTP server to offer?
  172.      
  173.      * Available  in 16- and 32-bit versions for  Win3.1,
  174.        WFW3.11, Win95, and NT.
  175.      * At  the time of this writing there were over  3500
  176.        registered users of Serv-U, with many of those for multiple
  177.        copies!
  178.      * Access for multiple clients at the same time. Access for
  179.        'Anonymous' users. With the possibility to limit the number
  180.        of clients at any given time, so your PC remains workable.
  181.      * Lots of security! On a directory and even file basis.
  182.        Allowing different settings for each user, and by putting
  183.        users into 'groups' permitting easy maintenance for large
  184.        numbers of users. There's even an option to allow or prohibit
  185.        clients on the basis of their IP-number. Ideal if you want to
  186.        let certain people roam around your computer, but you don't
  187.        want the whole world knocking at your door (that is to say:
  188.        they can knock, but they won't get in).
  189.      * Support for 'multi-homed IP' sites that need a single
  190.        server for servicing several IP numbers.
  191.      * Supports  upload/download ratios, and  disk  quota
  192.        limitations.
  193.      * Lots of other features, like configurable sign-on and
  194.        sign-off messages, per user configurable login messages,
  195.        directory change messages, and UNIX-style 'links'.
  196.      * Serv-U lets you execute programs remotely though your
  197.        FTP client.
  198.      * It allows transfer to or from ports, like PRN:, LPT1:,
  199.        COM1:, and AUX:. This allows you to setup your PC as a print
  200.        server by simply transferring the file to be printed to the
  201.        desired  port! Since the ports are part of the regular
  202.        security system, a user needs permission to transfer to/from
  203.        a port, allowing you to control who can use it.
  204.      * A quite complete implementation of, and very strict
  205.        adherence to the FTP standard (found in documents RFC 959 and
  206.        RFC 1123). Supports the 'passive' command PASV. This is
  207.        needed by WWW browsers and proxy agents (something required
  208.        when there is a 'firewall') for FTP transfer. Another feature
  209.        is that you can let 'Anonymous' users always see the root
  210.        directory ('/') as their login directory. This, again, is
  211.        needed by some WWW browsers to make FTP transfers work.
  212.      * Support for the 'resume' command.
  213.      * Support for external user access verification DLLs.
  214.      * Easy to setup and maintain. Everything is accessible
  215.        through menus, and for automated maintenance the settings are
  216.        stored in an .INI file of simple format.
  217.      * There is lots of logging! You can select how much to log
  218.        and where (to screen and/or file). The logfile is of a
  219.        standard format to make machine reading easy, in case you
  220.        need to do that for accounting purposes.
  221.      * It is fast! The file transfer speed you'll get will be
  222.        very close to the maximum your TCP/IP stack is capable of
  223.        (well, assuming your FTP client is at least as fast of
  224.        course).
  225.      * Life-time free updates when registered (As long as Serv-
  226.        U exists).
  227.      * Compared to the commercial implementations, Serv-U is
  228.        dirt cheap: less than 0.11 per line of code!
  229.  
  230. If  you didn't register this program, then you're looking  at
  231. the  try-out  version of Serv-U. When started for  the  first
  232. time, it'll let you choose between a fully functional program
  233. or  a  somewhat  crippled one. The text during  startup  will
  234. explain  these  options  clearly. If  you  choose  the  fully
  235. functional  version  then there is absolutely  no  difference
  236. with  the  registered version. But (yes, there had  to  be  a
  237. 'but'),  after  a little over 30 days it will  stop  working.
  238. Counting  starts the first time you run the program.  I  warn
  239. you beforehand: re-installing it will not help you!
  240.  
  241. And  finally: A big 'Thanks' to all the beta testers of Serv-
  242. U.  The  list  is  now  so long it is no longer  possible  to
  243. mention each one individually, but you guys definitely helped
  244. to  make Serv-U a better product! Any bugs that remain are of
  245. course  my  own fault. Special thanks to Ryan and Kevin,  for
  246. revising  the  manual! And, Alun, sorry again!  Seems  you'll
  247. have  some catching up to do (The monopoly is now really gone
  248. I fear).
  249.  
  250. OK,  enough  sales  talk.  Let's  continue  with  the  actual
  251. documentation. First thing will be how to install  Serv-U  to
  252. get you in business.
  253.  
  254.  
  255. 1. MAKING IT WORK - INSTALLATION
  256. ================================
  257.  
  258. You're eager to get things going, but a little afraid of what
  259. lies ahead. Never fear, it couldn't be simpler. So let's  get
  260. started!
  261.  
  262. 1.1 Installation
  263. ----------------
  264. Nothing is simpler than installing Serv-U: just unzip  it  in
  265. the directory of your choice and run it. There is no need  to
  266. change your 'PATH' or put anything in other directories.
  267.  
  268. The Serv-U zip-file comes with the following files:
  269.      SERV-U16.EXE    - The 16-bit version of the  FTP-server
  270.                        executable itself
  271.       - and/or -
  272.      SERV-U32.EXE    - The 32-bit version of the  FTP-server
  273.                        executable
  274.      SERV-U.DOC      - The  documentation  in  MS-Word
  275.                        version 6.0 format
  276.      SERV-U.TXT      - The documentation in ASCII format
  277.      README.TXT      - Something you have to read
  278.      REGISTER.TXT    - A registration form in ASCII format
  279.      VERSION.TXT     - A list of changes between the  various
  280.                        versions.
  281.      FILE_ID.DIZ     - Short description file for use by
  282.                        bulletin boards
  283.  
  284. When  Serv-U  is started for the first time, it  creates  the
  285. file:
  286.      SERV-U.INI      - File containing all settings  and
  287.                        user information
  288.  
  289. The 16-bit version of Serv-U uses Microsoft's 3D-controls  to
  290. make the dialog boxes look better. If for some reason you get
  291. flat-looking dialog boxes it means that the file  CTL3DV2.DLL
  292. is  missing.  This  file should be in your Window's  'system'
  293. directory.  It  is rare if this file is missing,  since  just
  294. about  anything these days uses it. However, if  you  need  a
  295. copy then drop me a line. The 32-bit version uses Windows  95
  296. style  controls. This means things will look flat on NT 3.51,
  297. this  is  normal. In NT 4.0 and Win95 you will  automagically
  298. get the 3D-look.
  299.  
  300. Serv-U offers two very distinct ways to try it out. Each with
  301. its  own  advantages and disadvantages. When started for  the
  302. first time (or in absence of a SERV-U.INI file), it will show
  303. you  a screen explaining the two try-out options and allowing
  304. you  to  choose  one  of them. The first choice  is  a  fully
  305. functional  try-out version exactly equal to the real  thing,
  306. but it will stop working after 30 and some days. It does this
  307. by  contacting  a permission server over the  Internet  every
  308. time Serv-U is started. The permission server keeps track  of
  309. when the program was started for the first time and uses that
  310. information  to  determine if it should  be  allowed  to  run
  311. again,  or not. It then sends this answer back to Serv-U  and
  312. the program will consequently work or stop. To this effect, a
  313. network packet is sent to the permission server containing  a
  314. version  code, the IP number of your PC, ID, and a  run/norun
  315. flag.  It receives back the same packet with the flag set  to
  316. run  or  stop. This is all that is communicated  between  the
  317. systems, nothing more, nothing less!
  318.  
  319. The  second  choice  is a try-out version  that  is  somewhat
  320. crippled. It will only allow a total of 10 file transfers  (5
  321. PUTs  and  5 GETs), it will show a message saying it  is  not
  322. registered  to anyone who logs into the server, and  finally,
  323. it  will  only stay on-line for one hour. You have to restart
  324. it  again  after that to get another hour. The  advantage  is
  325. that  it  will  not  contact my permission  server  over  the
  326. network.
  327.  
  328. Just to make sure this is clear: Once Serv-U is registered it
  329. will NEVER send anything over the network other than what  is
  330. needed  for  regular  FTP traffic! In short:  The  registered
  331. program will NOT contact my permission server!
  332.  
  333. 1.2 Network  Installation
  334. -------------------------
  335. To  find  the  setup information, Serv-U first looks  in  the
  336. program directory (i.e. where SERV-U.EXE is located) for  the
  337. file  SERV-U.INI. If no .INI file is found, the program looks
  338. for  the  existence of an environment variable with the  name
  339. SERV-U. If this variable exists, it should be set to the path
  340. for  SERV-U.INI. The program will then use the .INI file this
  341. path  points  to.  For network use with a  single  executable
  342. shared  between many users that need their own settings  this
  343. is  a  convenient  way to set things up. If this  environment
  344. variable  does  not  exist, the whole DOS  path  is  searched
  345. including  the  Windows directories. If a file SERV-U.INI  is
  346. found somewhere it will be used, this way also allowing for a
  347. single  copy  of  the  executable on a network  server  while
  348. having  individual settings for each user. Finally, if  SERV-
  349. U.INI  was still not found, it will be created in the default
  350. program directory.
  351.  
  352. If  a  SERV-U.INI file is available it does not  have  to  be
  353. writable  per se. The program will work when it is read-only,
  354. but  setup  changes and the current position  of  the  Serv-U
  355. window will not be saved.
  356.  
  357. 1.3 Command Line Options
  358. ------------------------
  359. Serv-U  recognizes a number of command line options that  may
  360. be  convenient  to  tailor  it to your  particular  use.  The
  361. following is recognized:
  362.  
  363.      / h  = Hide the server after startup.
  364.      / i  = Start the server as an icon.
  365.      / u  = Stop 'unconditionally'.
  366.  
  367. Hiding  the server makes it disappear, there will be no  icon
  368. nor window and no way to interact with it. All you can do  to
  369. stop  the  server after that is either kill the task  in  the
  370. task  manager,  or  reset the computer.  The  'unconditional'
  371. option means that if the server is stopped it'll quit without
  372. any  warning, even if there are still users logged  in.  This
  373. can  be  convenient if you want to be able to stop the server
  374. from a script.
  375.  
  376. 1.4 Quick Setup
  377. ---------------
  378. When you run Serv-U for the first time there will be no users
  379. and  access  will be restricted.  This section will  describe
  380. the  bare  necessities to allow access. In addition  you  can
  381. also  go  through  the 'Setup' menu items  and  put  in  your
  382. heart's  desires. The next chapter will explain  the  various
  383. options and how to use them. You might want to take a look at
  384. it,  since  the  setup  is simple but not  totally  intuitive
  385. (Sorry for that, I tried hard but . . .).
  386.  
  387. Now, to quickly get Serv-U up & running, just start it. Leave
  388. all  the settings at their defaults, since in most cases that
  389. will be OK. By design Serv-U was made to be 'safe' out of the
  390. box:  Unless you specify otherwise your PC is well  protected
  391. by  the default settings, giving you one thing less to  worry
  392. about. Right! Let's have a go at it.
  393.  
  394. At  this  point you have a functioning server but no  defined
  395. users,  so  no  one can log in. To define users,  go  to  the
  396. 'Setup  - Users' section  in the menu and you'll see a  blank
  397. user  setup  screen. Now I'll assume you want to  setup  your
  398. server  for  anonymous  access. To make  that  work,  do  the
  399. following:
  400.      * At  'User  name', type the name we  want  to  add:
  401.        'anonymous'
  402.      * At 'Home directory', type the directory where you want
  403.        anonymous  users to be. Let's assume we want  them  on
  404.        'd:\anonftp', so enter this (or press 'Browse' and choose
  405.        your favorite home directory for anonymous users).
  406.      * Press the 'Add' button of the 'File/Directory access
  407.        rules' section.
  408.      * Anonymous users need access to their home directory, so
  409.        enter 'd:\anonftp' in the dialog box and press 'OK'.
  410.      * To hide the rest of the PC from anonymous users we'll
  411.        make them see '/' as their home directory. To do this select
  412.        the 'Miscellaneous' button. In the dialog box that pops up
  413.        check the 'Show path relative to homedir' button and press
  414.        'OK'.
  415.      * That's all, just leave the other settings at their
  416.        default values and press 'Store' to save your setup.
  417.  
  418. You  now have a user with name 'Anonymous' that can log  into
  419. the  server.  Of  course, if you want anonymous  users  in  a
  420. different  directory then 'd:\anonftp',  then  feel  free  to
  421. change  this. Just make sure that the directory  you  specify
  422. actually exist and that it is part of the access rules.
  423.  
  424. If  the  zip-file you have came with both the 16- and  32-bit
  425. version of Serv-U (SERV-U16.EXE and SERV-U32.EXE respectively
  426. -  the  first is for Win3.1 and WFW3.11, the latter for Win95
  427. and  NT),  and  you only need one of them, then  you  can  of
  428. course delete the other to free up disk space.
  429.  
  430. 1.5 De-installation
  431. -------------------
  432. It  is  hard to imagine why, but if for some reason some  day
  433. you  want to get rid of Serv-U then that is just as  easy  as
  434. was  installing it. Just delete the whole directory where you
  435. put  it,  and  that's it! Serv-U does not change  any  system
  436. files and does not place any files in other directories.
  437.  
  438. 1.6 Upgrading
  439. -------------
  440. Upgrading from an earlier version of Serv-U is not difficult,
  441. but  there are a few things to keep an eye on. Here  are  the
  442. steps to follow:
  443.      * If you are running Serv-U: Exit the program.
  444.      * Make a backup of the old Serv-U files. Just in case.
  445.      * Unzip the new Serv-U zip-file in a temporary directory
  446.        and copy the contents over the existing files in your Serv-U
  447.        directory (Watch out that you get the direction of copying
  448.        right!).
  449.      * Go to the Serv-U directory and delete the file BWCC.DLL
  450.        if it exists, version 2 no longer needs this file. Note: Only
  451.        delete BWCC.DLL if it is in the Serv-U directory, do not
  452.        delete the one in the Windows\System directory as other
  453.        programs might use this.
  454.      * If you are using '%' directives in signon and signoff
  455.        messages, login messages or directory change message, then
  456.        you might have to change those. The directives of version 2.0
  457.        no longer work and some of the directives of 2.0c have been
  458.        changed. Take a look at the 'How to setup sign-on and/or sign-
  459.        off messages' section for the new directives.
  460.  
  461. Your  old SERV-U.INI file will be used by the new program  so
  462. you  don't  have to re-install any users. All your  settings,
  463. and your registration key (which also resides in SERV-U.INI -
  464. in case you registered), stay intact.
  465.  
  466. The 16-bit version of Serv-U now uses Microsoft's 3D-controls
  467. to create a 3D-look. This is done by a file named CTL3DV2.DLL
  468. which should be in your WINDOWS\SYSTEM directory. Most likely
  469. you  already have this file, and therefore it is not part  of
  470. the  Serv-U zip-file. But if the dialog boxes look flat  then
  471. drop  me a line and I will make the DLL available. Note  that
  472. this is only meant for the 16-bit version of Serv-U. The  32-
  473. bit  version will always look flat on NT 3.51! On Windows  95
  474. and  NT  4  the  32-bit  version will use  the  built-in  3D-
  475. controls, and thus have a 3D-look.
  476.  
  477. 1.6 Known Bugs & Problems
  478. -------------------------
  479. At  the  time  this documentation is being written  the  only
  480. known  bug  left in the program is the lack of on-line  help.
  481. Everything that was found in earlier versions has been fixed.
  482. If  you  have  any  problems,  please  first  check  out  the
  483. 'Frequently  Asked Questions' on my Web site (HTTP://www.cat-
  484. soft.com).  I will do my best to keep an up-to-date  list  of
  485. everything worthwhile there.
  486.  
  487. Unfortunately  there  are still a number  of  WinSock  socket
  488. stacks that are not 100% compliant with the WinSock standard.
  489. Since  Serv-U uses the stack to its fullest, this can  result
  490. in  a  number  of symptoms. The following has been  observed:
  491. directory listings and file transfers do not work; after  the
  492. first  client  the  server seems blocked; WWW  browsers  seem
  493. unable to work with Serv-U; the PC is blocked when Serv-U  is
  494. transferring a file.
  495.  
  496. Problem WinSock socket stacks
  497. -----------------------------
  498. Below is the current list of socket stacks that are known  to
  499. cause  problems.  If you find any others  with  problems,  or
  500. solutions to the ones mentioned below, please let me know  so
  501. I can pass the word on to others.
  502.      * The SuperTCP socket stack results in crashes of Serv-U.
  503.        Both versions 4.00 and 4.04 were tested with similar lack of
  504.        results.
  505.      * Reports indicate that the WinSock stack which comes with
  506.        an AOL account does not work. So far it is unclear if this is
  507.        an incidental or general problem.
  508.      * FTP Software Inc's socket stack: Their earlier stacks
  509.        cause problems. Version 2.2 with WINSOCK.DLL v1.15.1 is
  510.        rumored      to      work      OK.      Check      out
  511.        ftp://ftp.ftp.com/support/ftpsoft/winsock for updates. Their
  512.        latest version WINSOCK.DLL can be found in WINSOCK.EXE
  513.        (currently v1.17.1).
  514.      * Spry's Internet-in-a-box stack: Version 2.0 is rumored
  515.        to work OK. Earlier versions had a multitude of problems.
  516.        Check                                              out
  517.        http://www.spry.com:80/products/upgradingibox.html for
  518.        updates.
  519.      * The Air socket stack is rumored to come from the same
  520.        factory as Spry's. Won't work though.
  521.      * Core Systems' Internet-Connect stack does not work with
  522.        Serv-U.
  523.      * DEC's PathWorks stack does not work either.
  524.      * Neither does CISCO's socket stack that comes with Suite
  525.        100.
  526.      * Sun's PC-NFS stack version 5.1A and later works, but
  527.        earlier versions are a problem.
  528.      * Earlier versions of the Microsoft Wolverine stack had a
  529.        tendency to bomb back to DOS when the network got busy. This
  530.        has  been  fixed  in  version  3.11b,  available  from
  531.        ftp://ftp.microsoft.com/bussys/clients/wfw/tcp32b.exe. A
  532.        highly recommended stack!
  533.      * Novell's LanWorkplace stack seems to work for some
  534.        people, but doesn't for others. In any event, you need
  535.        version 4.2T3 or later. The 'T3' patch is available from
  536.        http://netwire.novell.com/servsup/binhtml/1203536.htm.
  537.      * In case you have Netmanage's Chameleon's Sampler you
  538.        need at least version 3.11. Reports are that it works fine on
  539.        version 4.5.1 of Chameleon.
  540.      * PC/TCP's OnNet stack locks up the PC during file
  541.        transfers, but it works fine otherwise.
  542.      * CompuServe's WinSock stack does not work with Serv-U
  543.        (Wasn't that bought from Spry?!).
  544.      * The  various  versions of Trumpet's WinSock  stack
  545.        generally work fine. But, version 2.0b had a tendency to kill
  546.        the socket Serv-U uses to listen for incoming clients, thus
  547.        making the server unreachable. This has been fixed in version
  548.        2.1f,     so     better    get    that    one     from
  549.        ftp://jazz.trumpet.com.au/pub/winsock/twsk21f.zip.
  550.      * Quarterdeck's socket stack does not work with Serv-U.
  551.      * The Windows 95 built-in 16-bit TCP/IP stack usually
  552.        works fine, and is very stable. But, it sometimes kills Serv-
  553.        U's listening socket, resulting in 'Connection denied'
  554.        messages  from clients. This is a Win95 bug  which  MS
  555.        acknowledges and claims to be the result of programs not
  556.        freeing their sockets before terminating. The latter is
  557.        probably BS, IMHO, but it lets them pass the buck. Most
  558.        people will never see this while others seem to have the
  559.        problem continuously. The advise is to use the 32-bit version
  560.        of Serv-U on Win95.
  561.  
  562. 'SLIP/PPP emulators - TIA, TWinsock, Pipeline'
  563. ----------------------------------------------
  564. If  you  are  using  a  so called 'SLIP emulator'  like  TIA,
  565. TWinsock,  or Pipeline, there are also a number of things  to
  566. keep   in   mind.  These  emulators  are  not  real  Internet
  567. connections,  and because of the way they have  to  do  their
  568. work they have a number of peculiarities. Since the PC has to
  569. share  the  IP number with the host system you will generally
  570. not  be  able to use the default port 21 for Serv-U. Instead,
  571. you  either  have to use a high port number (generally  above
  572. 8000) or set up 'port redirection'. Ask you Internet provider
  573. for  details about the latter. A related problem is that  the
  574. IP  number  displayed by Serv-U is not  the  IP  number  that
  575. clients  should use to contact your server. It  is  merely  a
  576. dummy  to  keep  the socket stack of the PC  happy.  For  the
  577. outside  world the IP number of your server is  the  same  as
  578. that  of the emulator host system, i.e. that of your Internet
  579. provider. Another special effect is that clients will not  be
  580. able  to  use 'passive' mode for data transfers.  This  means
  581. that  regular FTP clients will work OK, but WWW browsers like
  582. Netscape and Mosaic will not work when Serv-U runs via a SLIP
  583. emulator.  For  the same reason it won't be possible  to  use
  584. clients that are also connected via a SLIP emulator.
  585.  
  586. Dynamic IP
  587. ----------
  588. If  you  use a modem and telephone to connect to the Internet
  589. via a service provider, then chances are that you will get  a
  590. different IP number each time you connect to the network. You
  591. can  see  what  your current IP number is by looking  at  the
  592. startup  messages  of  Serv-U: one of the  lines  is  the  IP
  593. number. Serv-U does not have a problem with dynamic IP.  Just
  594. make  sure  you  start the server after  connecting  to  your
  595. service  provider,  so  Serv-U will  report  the  current  IP
  596. number.  However, if you want to run a steady FTP site,  then
  597. dynamic  IP  is a pain in the lower rear end! You users  will
  598. have  to  know  which IP number to contact and  if  yours  is
  599. changing all the time it does not help.
  600.  
  601. Your  IP number is entirely up to your provider and there  is
  602. absolutely nothing Serv-U can do about it! It merely uses the
  603. number  available.  So,  if you want a  fixed  ('static')  IP
  604. number  the  only person to talk to is your Internet  service
  605. provider. Sometimes it is possible to get a fixed symbolic IP
  606. name, even though the number varies each time (An IP name  is
  607. something like 'www.cat-soft.com', you can use it instead  of
  608. an IP number). Again, talk to your provider.
  609.    
  610. 1.7 A Word to the Wise (but paranoid)
  611. -------------------------------------
  612. Many  a  word has been spent on the alt.winsock newsgroup  on
  613. the  try-out enforcement practice of Serv-U, and in a broader
  614. sense on the security of network programs. If you choose  for
  615. the 'fully functional try-out version' then this program will
  616. communicate with a remote system to determine if it should be
  617. allowed  to work or not. That is the way the 30 days of  try-
  618. out  are  enforced. To that effect, information is  exchanged
  619. between your PC and a server over here, and as people  asked:
  620. How  do I know that my password file is not being sent  over?
  621. Another, but similar question is: How can I be sure there are
  622. no  'back doors' in the server, allowing access to the author
  623. at any time? The short and hard answer is: You don't know and
  624. you can never be sure!
  625.  
  626. I  know this is not much of a deal, so I'll at least give you
  627. one option to establish my good intentions. To anyone who  is
  628. interested,  I  offer to personally go over the  source  code
  629. with you (all 22000+ lines of it) and we'll compile it on the
  630. spot. You will understand that I am not going to hand out any
  631. source  code. If you want to take it home you'd better  bring
  632. along a whole lot of $$$'s!
  633.  
  634. It  is worthwhile to realize that security is a problem  with
  635. any  type  of  network  program. It  is  fairly  easy  for  a
  636. programmer  to put code in, for example, a WWW  browser  that
  637. will  wait  for  5  months, until the  full  moon  and  Venus
  638. coincide, then monitor PC activity and if a user hasn't  been
  639. present for a few hours, or if it's 4 in the morning,  starts
  640. sending  over  the  whole hard disk to unknown  destinations.
  641. This  kind  of thing is not easy to detect, don't let  anyone
  642. tell  you  otherwise, and I still have  to  meet  the  system
  643. manager that keeps a network monitor running 24 hours a  day,
  644. year  after year and actually reads the log files. The bottom
  645. line  is  that you will have to trust the author of a program
  646. at some point, there is no other choice!
  647.  
  648. Now don't write to me that conversely I should trust you that
  649. "the check is in the mail and please send me the registration
  650. key in advance".
  651.  
  652. That is all I have to say about installing Serv-U. Next let's
  653. look  into how we can use it to get some real work done.  The
  654. next chapter will take you through all its features.
  655.  
  656.  
  657. 2. USING SERV-U - HOW TO ...
  658. ============================
  659.  
  660. Rather than describing every menu and dialog box to its  last
  661. boring detail, I though it would be more useful to present  a
  662. task-driven approach. This chapter is therefore divided  into
  663. sections that each describe how a specific task can be  done,
  664. in the form of 'How to' questions and answers. There is a bit
  665. of overlap between the sections, so you might come across the
  666. same  thing more than once. If you read this manual cover-to-
  667. cover  then you will also have learned about every  menu  and
  668. dialog  box  detail  in  the process.  Makes  great  bed-time
  669. reading!
  670.  
  671. 2.1 How to Setup Your Server
  672. ----------------------------
  673. You  shouldn't believe all I say: This first section is going
  674. to  go  over  the 'Setup - FTP Server' menu choice  in  every
  675. grueling  detail! No, seriously, this dialog  box  stands  so
  676. much  at  the  basis of Serv-U's operation and the  items  in
  677. there  do not fit very well in other sections, that it  is  a
  678. good  idea  to cover it first, and I will only discuss  those
  679. items that are not covered by other sections. So, let's  pull
  680. up the 'Setup FTP-Server' dialog box.
  681.  
  682. The first item is 'FTP port number'. This is the (you guessed
  683. it!)  port number that the server will listen on for incoming
  684. FTP  clients.  The default is number 21, but you're  free  to
  685. fill in anything you want, provided it does not conflict with
  686. other  network programs. Filling in a number that is  already
  687. in  use will make Serv-U complain bitterly, so that's easy to
  688. catch.  Of course, the rest of the world expects a FTP server
  689. to  listen  on port 21, but changing it to another number  is
  690. one  great  way  of insuring that only you and some  selected
  691. friends will know about your server.
  692.  
  693. The  next  item is the 'Maximum no. of users'. With this  you
  694. set  the  maximum number of simultaneous users at  any  given
  695. moment.  Setting  it  to 0 will not allow  anyone  to  enter,
  696. leaving  it  blank will allow an unlimited number,  or,  more
  697. precisely, until the PC runs out of network sockets or  other
  698. resources  like memory. If you need your PC for regular  work
  699. as  well as being a FTP server, it is probably wise to set  a
  700. maximum so normal operations will not be slowed down too much
  701. by  clients. Likewise, 'Maximum no. of anonymous' limits  the
  702. number  of 'Anonymous' users at any given moment. If 'Maximum
  703. no.  of  users' is specified, then this will limit the  total
  704. number of users, both regular and anonymous, even if 'Maximum
  705. number of anonymous' is set to a larger number.
  706.  
  707. Some people have asked what would be reasonable settings  for
  708. the  maximum number of users that would still keep the system
  709. workable. The answer is: It depends. It depends very much  on
  710. whether these users are local and thus capable of using up  a
  711. large  bandwidth in data transfer, or alternatively, if these
  712. users  are  further  away  on the  Internet  and  cannot  get
  713. transfer  speeds  of  more than about 10 Kbytes  per  second.
  714. Another  concern  is  the socket stack. Some  WinSock  stacks
  715. start  behaving erratically when they have to  service  large
  716. numbers  of  sockets. Most notoriously is or  was  the  first
  717. version of the Microsoft 32-bit 'Wolverine' stack, which  had
  718. the  tendency to kick the system back to MS-DOS  without  any
  719. warning  when  heavily loaded. One way to find out  how  many
  720. users  your system can handle, in case you run Windows 95  or
  721. NT, is to start the system monitor and keep an eye on the CPU
  722. usage percentage. This will give you a pretty good idea  very
  723. fast.  My experience is that even a measly 486 can handle  20
  724. or so concurrent users with easy.
  725.  
  726. This  brings  me  to another topic which is  related  to  the
  727. above:  Server stability is going to depend very much on  the
  728. operating  system you are using. MS-Windows 3.1  and  WFW3.11
  729. are  inherently so unstable that you should not expect Serv-U
  730. to  run for more than a few days at a time before a reboot is
  731. needed. Very much better is Windows 95, especially when  used
  732. with  the  build-in socket stack. Having used  it  since  the
  733. early  betas  it seems to work fine for several  weeks  at  a
  734. time. Definitely recommended for serious server work! At  the
  735. top  of  the stability list stands NT. The Cat Soft ftp  site
  736. (ftp.cat-soft.com) has been running on NT for quite  a  while
  737. now, and it seems very stable!
  738.  
  739. Another often asked question concerns maximum transfer speeds
  740. that can be obtained with Serv-U: Let's just say that even on
  741. a  measly  486 you don't have to worry about this unless  you
  742. have  at  least  a T3 network connection, Serv-U  can  easily
  743. saturate  a T1 line (= about 1.5 Mbits per second).  You  can
  744. try  out raw speed by yourself: Just start a FTP client, like
  745. WS_FTP  on  the  same PC as where the server is  running  and
  746. transfer some files through it. This bypasses the network, so
  747. what  you are seeing is Serv-U plus hard disk access and part
  748. of  the  socket stack. The conclusion from this will probably
  749. be  that your biggest performance bottle neck is going to  be
  750. your network connection.
  751.  
  752. Let's  get on with the list. To  make sure that users  cannot
  753. log onto your server and keep connections open until eternity
  754. it   is  possible  to  set  'Time-out  users'  and  'Time-out
  755. anonymous'. If a connection has been idle for more  than  the
  756. number  of  minutes you specify here it will be automatically
  757. closed.  Filling  in 0 or leaving it blank switches  off  the
  758. time-out.  It  is  a good idea to fill in some  values  here,
  759. since  otherwise the system would slowly fill up with sockets
  760. that  for  some reason got stuck, not to mention  users  that
  761. connect  and  start  a transfer just before  they  leave  the
  762. office in the evening and then go home. Default values are 15
  763. minutes  for anonymous users and 10 hours (=600 minutes)  for
  764. regular users.
  765.  
  766. If  you would like to leave your PC wide open for the rest of
  767. the world you can uncheck the 'Enable security' checkbox. But
  768. beware:  DISABLING SECURITY WILL ALLOW ANYBODY ON THE NETWORK
  769. TO  DELETE/CHANGE/COPY  EVERYTHING ON  YOUR  PC!!!  The  only
  770. reason  I  put this option in is to make it easy  for  people
  771. that have their own local network and don't want to mess with
  772. users  and  passwords. By default this option is, of  course,
  773. checked.  DO  NOT  EVER  LEAVE THE 'Enable  Security'  OPTION
  774. UNCHECKED IF YOUR PC IS CONNECTED TO THE INTERNET!!!
  775.  
  776. The  rest  of  the items in the server setup dialog  box  are
  777. covered  in other sections of this chapter. So, just read  on
  778. and you'll eventually get to know them all.
  779.  
  780. 2.2 How to Add a User
  781. ---------------------
  782. One of the most fundamental tasks you are going to have to do
  783. is  adding  new users. Unless you switched off all  security,
  784. you are going to have to deal with this.
  785.  
  786. Upon choosing the 'Setup - Users' menu option a dialog box is
  787. presented  to you. It contains a list of all known  users  on
  788. the  left and by clicking on one of those users you  can  see
  789. the  settings for that user on the right side.  Now,  if  you
  790. just started this server for the first time there will be  no
  791. names  in the list, short of Divine Intervention. If you  are
  792. at this point and are about to setup your first user, just go
  793. ahead  and  type in the various fields. If there already  are
  794. users defined you will see the settings of the first one  and
  795. to  get  rid  of  this and create an empty sheet  just  press
  796. 'New'.  Doing the latter will pop up a little box asking  you
  797. for the new user's name, which I think speaks for itself.
  798.  
  799. The  next thing can come in handy, so pay attention: You  can
  800. fill  in or change any name in the 'User name' field. If this
  801. new  name  does  not exist it will be added to  the  list  of
  802. users.  If this name exists, the settings for this user  will
  803. be  changed to the ones in the dialog box. In short, this  is
  804. another  way  to  add new users. So, if you clicked  on  user
  805. 'James' and then go on to set his password to 'lightbulb' and
  806. you  change  the user name to something that does  not  exist
  807. yet,  let's  say 'Tanya', then you just created  a  new  user
  808. Tanya with all the settings of James except for his password.
  809. This  way  of dealing with users might strike you as somewhat
  810. strange. The advantage of it is that you can take an existing
  811. user and, by making only the few needed changes, turn it into
  812. a new user.
  813.  
  814. Now  let's  take a closer look at the various fields  in  the
  815. 'Setup  Users'  dialog box. I've dealt with the  'User  name'
  816. field,  so this brings us to 'Group name'. Every user can  be
  817. part  of a group. The convenience in making users part  of  a
  818. group is that you can leave common settings for all users  of
  819. a particular group blank and just fill them out in the 'Setup
  820. Group'  dialog box, about which you can find more information
  821. later  on  in the 'How to use groups' section. This goes  for
  822. all  settings,  including password, home directory  and  path
  823. access  rules.  To overrule a certain group  setting,  simply
  824. provide  one for the user. Only exception for groups  is  the
  825. user  with  special  name 'Anonymous'.  For  'Anonymous'  the
  826. system ignores any group setting you might have. In fact,  if
  827. you  try to enter a group for a user with that name it  won't
  828. even  get  stored and is gone the next time you look  at  the
  829. settings for 'Anonymous'. This was done for security reasons.
  830.  
  831. We  did  get  ahead  of ourselves in the  discussion  of  the
  832. various fields, so let me back up a bit. The 'Password' field
  833. is  of course for adding a password for a user. The passwords
  834. are stored encrypted using UNIX 'crypt'. As is normal for the
  835. 'crypt' function, only the first 8 characters of the password
  836. are used. Don't loose any sleep over this though, it is still
  837. very  safe. This algorithm works like a sausage machine:  you
  838. put  in  a  pig on one end and turn the crank, out comes  the
  839. sausage. But, pushing in the sausage while turning the  crank
  840. backwards  will  not  get you a pig! It is  quite  secure,  I
  841. wouldn't  know  of a way to get the plain text password  back
  842. (the  NSA  might though). Once a password is stored you  will
  843. only see the word '<<Encrypted>>' in the password field. This
  844. is  to indicate there is a password. You cannot edit existing
  845. passwords,  since  the original is truly lost  and  only  the
  846. encrypted  form  is kept. The only way to  change  it  is  by
  847. typing in a completely new one.
  848.  
  849. If you leave the password field empty this does not mean that
  850. the  user has no password. Serv-U assumes that all users need
  851. a  password and will try if there is a group setting and look
  852. at  that  for the password. If no password can be found  then
  853. access will be denied to the user. There is a way to setup  a
  854. user without a password, but  it needs direct editing of  the
  855. SERV-U.INI  file. You can find the details in the chapter  on
  856. Serv-U internals.
  857.  
  858. There  is  one  more  exception  with  passwords  that  you'd
  859. probably already know: The user name 'Anonymous' never has  a
  860. password. Instead, Serv-U will ask for a E-mail address.
  861.  
  862. The  'Home  directory' field is for the user's home directory
  863. (To  kick in an open door). This is the place where he or she
  864. is  put immediately after logging in. Each user needs a  home
  865. directory, without one the server will not permit logging in!
  866. Of course, if a user is part of a group, and this group has a
  867. home  directory you don't have to specify one here. You might
  868. want to, if this user needs a different one from the rest  of
  869. the  group.  Home  directories always need to  be  full  path
  870. names, including a drive letter!
  871.  
  872. A large portion of the 'Setup Users' dialog box is devoted to
  873. 'access   rules'.   These  determine  to  which   files   and
  874. directories a user has access. In general, you will  have  to
  875. make  sure that the user has at least read access to  his  or
  876. her  home directory. The quick-and-dirty way to setup  access
  877. for a user is therefore to press 'Add' and enter the path  of
  878. the  user's home directory. Then check the appropriate access
  879. rights, which in this case should be at least 'read', 'list',
  880. and  'inherit',  and you have a functional account.  Although
  881. their use is pretty straight forward in most cases there  are
  882. still  some  ins and outs to access rules. So please  take  a
  883. look at the section 'How to use access rules' which discusses
  884. them in more detail.
  885.  
  886. Obviously, clicking the 'Store' button will store  the  newly
  887. created user settings. But this is not the only way: You  can
  888. also  leave  the setup screen by pressing 'OK',  any  unsaved
  889. changes  will  be stored as well. Also, if you  already  have
  890. other  users set up, clicking the mouse on another user  name
  891. will save changes.
  892.  
  893. We  already came across the special user name 'Anonymous'  to
  894. allow  access  without a password. The  user  name  'FTP'  is
  895. understood  by  Serv-U as a synonym for 'Anonymous'.  When  a
  896. user  enters  'FTP' it will be translated to 'Anonymous',  so
  897. the  latter's settings apply to 'FTP'. There is one more user
  898. name  with  special meaning to Serv-U: 'ALL'. Now where  does
  899. this  tie in? Well, every action requiring security clearance
  900. (checking a password during login, reading, writing, etc.) is
  901. first  checked against the settings for the particular  user.
  902. If  no  appropriate  setting is found  there,  and  the  user
  903. belongs  to  some group, the group settings are  checked.  If
  904. still  no  corresponding setting is found, the user 'ALL'  is
  905. consulted (if it exists). So 'ALL' works as a blanket for all
  906. users,  providing the most common settings. Of  course,  this
  907. also provides a potentially big security hole, so be careful!
  908.  
  909. Most  of  the other buttons and items are explained in  other
  910. sections,   but   let's   go  over   the   details   of   the
  911. 'Miscellaneous' dialog box here. If all you want is to set up
  912. simple  FTP access you probably can ignore anything in there.
  913. The  miscellaneous items let you fine-tune some details  that
  914. might  be  useful.  Just press the 'Misc' button to get  into
  915. it.
  916.  
  917. If you want to disable the account of a user so he cannot log
  918. in without deleting it, this is done by checking the 'Disable
  919. account' checkbox. A tip: This also works in a group, so  you
  920. can  disable  an  entire group of users with a  single  mouse
  921. click!
  922.  
  923. The  next item, 'Show path relative to homedir' can  be  very
  924. useful  and powerful, but there are some snags to it  so  pay
  925. close attention: When this is enabled Serv-U will try to show
  926. all the directories a user deals with as if they are relative
  927. to  the  user's home directory (Hence the name). For example,
  928. if  a  user has home directory c:\users\anonymous, this would
  929. show   up   as   '/'   to  the  user.  If   he   changed   to
  930. c:\users\anonymous\uploads all he'd  see  is  '/uploads'.  It
  931. completely hides the real path with drive, and makes the  FTP
  932. client believe it is in the root of the file system. This can
  933. be great in many cases, but there are also potential problems
  934. to it. Serv-U can only do this trick for directories that are
  935. either  at  or  below the home directory  of  the  user.  For
  936. example, if the homedir is c:\users\anonymous again, there is
  937. no  way  that Serv-U can represent e:\pictures\furry relative
  938. to  that.  In short, with 'relative paths' enabled  the  user
  939. will  not  be able to go outside of his or her home directory
  940. (and the directories below the homedir).
  941.  
  942. By  checking  'Hide hidden files' Serv-U will  not  show  any
  943. files  that  have  the file attribute 'hidden'  in  directory
  944. listings. This is useful for hiding directory change  message
  945. files and link files.
  946.  
  947. The  final  checkbox lets you control if  a  user  should  be
  948. allowed to log in even after the maximum number of users  has
  949. been  reached. This is good for you yourself, as  the  system
  950. administrator. It would let you log into your own  server  at
  951. all times.
  952.  
  953. This  brings us to the 'Message file' field. You  can  put  a
  954. file  name of a text file in there. The contents of this file
  955. will  be  displayed to the user just after logging  in.  More
  956. about this in 'How to setup user specific login messages'.
  957.  
  958. This  should  have you started in creating user account.  The
  959. next  section  gives  you  a few details  on  how  to  change
  960. existing user accounts.
  961.  
  962. 2.3 How to Change a User
  963. ------------------------
  964. For  the  most  part  the things mentioned  in  the  previous
  965. section,  'How  to add a user', also apply to  changing  user
  966. settings. However, there are a few peculiarities that deserve
  967. extra attention.
  968.  
  969. First  of  all,  keep in mind that you can  change  a  user's
  970. settings  at all times in the 'Setup Users' dialog box.  This
  971. includes  the user's name, but care should be taken in  doing
  972. this,  since there might be side effects: If you  change  the
  973. name  to a non-existent one and store the settings this  will
  974. in  effect  create a new user with that name.  Also,  if  you
  975. change  the  name  to one that already exists  then  you  are
  976. changing  the settings for the user with that name!  To  drag
  977. our  favorite example once more out of the closet: Let's  say
  978. you  want  to  change the password of user  'James'.  So  you
  979. clicked  on  'James' and then go on to set  his  password  to
  980. 'lightbulb' and you change the user name to that  of  another
  981. user,  let's  say 'Tanya'. Then Tanya is going to  be  mighty
  982. upset when she tries to enter your FTP server! James will  of
  983. course  have  to  remember  his old password,  since  nothing
  984. changed for him.
  985.  
  986. Another peculiarity that can come in handy is when changes to
  987. user  settings get stored. There are several ways to do this.
  988. Obviously clicking on 'Store' will do the trick. Another  way
  989. is to press 'OK' and leave the user setup. This will save any
  990. changes  too. The third and last way to store changes  is  by
  991. simply  selecting another user from the list on the  left  of
  992. the  'Setup Users' dialog box. Up until you store changes you
  993. can  recover  the  original  settings  by  the  pressing  the
  994. 'Restore' button. This does not hold for the 'Delete' button.
  995. Pressing  this  will erase the selected user  completely  and
  996. there is no way to get it back (I'm a nice guy, so you'll get
  997. warned first when attempting this)!
  998.  
  999. If  you're  editing an existing user who has a password,  the
  1000. word  '<<Encrypted>>' will be shown in  the  password  field.
  1001. This  indicates there is a password, as opposed to not having
  1002. a  password in which case this can be supplied by  the  group
  1003. settings.  There is no way to recover the original  password,
  1004. once  entered it is lost! So, there is no possibility to edit
  1005. the  existing  password, you can only enter a completely  new
  1006. one.  To  do  this, erase the word '<<Encrypted>>' completely
  1007. and type in the new password.
  1008.  
  1009. Something that might be of interest to you if you edit  users
  1010. by  directly changing the SERV-U.INI file using your favorite
  1011. text editor (for example 'notepad'): Any changes you make  to
  1012. users  take immediate effect. No restarting of the server  is
  1013. needed.  This means that you could keep a local copy of  your
  1014. INI  file and use a local version of Serv-U to edit it.  Then
  1015. just  use  Serv-U itself for uploading the changed SERV-U.INI
  1016. file to the production site and you are all set.
  1017.  
  1018. That  concludes all you need to know for keeping your  user's
  1019. settings  up-to-date, but it is time to fill in a  big  blank
  1020. that is of the essence to using Serv-U: The access rules.
  1021.  
  1022. 2.4 How to Use Access Rules
  1023. ---------------------------
  1024. The 'Access rules' part in the 'Setup Users' dialog box forms
  1025. the  corner stone of Serv-U's security. This is also the part
  1026. that  makes  Serv-U unique: It allows very fine control  over
  1027. what   a  user  can or cannot do. It allows  you  to  specify
  1028. access per directory and even per file for each user!
  1029.  
  1030. How  does  all  this work? Take a look at the 'File/Directory
  1031. access rules' list in the 'Setup Users' dialog box. This list
  1032. contains a number of paths with access information coupled to
  1033. each  path.  Access  to the PC is only allowed  according  to
  1034. these paths and their access information. No access path,  no
  1035. access! So, there is one path you might always want to put in
  1036. the  list: The user's home directory. The check boxes at  the
  1037. right of the path list show what kind of access the user  has
  1038. to  the path in the list. Again, unless the type of access is
  1039. specified in these check boxes the user won't get in.
  1040.  
  1041. Let's  take  a  look at the different type of access  we  can
  1042. specify  per  directory or file. There  are  eight  different
  1043. types  of access information that can be set, four that apply
  1044. to  files,  three for directories, and the  final  one  is  a
  1045. special case. To start with file access:
  1046.      * 'Read'  access, allows files to be copied from  the  PC
  1047.        using the FTP 'get' command.
  1048.      * 'Write'  access, allows files to be copied  to  the  PC
  1049.        using 'put', but not changed, deleted, or renamed.
  1050.      * 'Delete' access, allows the user to change  files,
  1051.        rename, or delete them. Having 'Delete' access automatically
  1052.        includes write access (although it does no harm to specify
  1053.        both).
  1054.      * 'Execute' access, is meant for executing files through
  1055.        FTP, i.e. for running DOS and Windows programs remotely.
  1056.  
  1057. Then there are three items that deal with directories:
  1058.      * 'List' access, allows the user to retrieve a directory
  1059.        listing using the FTP 'dir' command.
  1060.      * 'Make' access lets the user create new directories at
  1061.        this path, i.e. the user can make subdirectories.
  1062.      * 'Remove' allows the user to delete directories.
  1063.  
  1064. The final item is somewhat special:
  1065.      * 'Inherit' means that the access rule automatically
  1066.        applies to all subdirectories of the path, i.e. the rule is
  1067.        inherited by subdirectories.
  1068.  
  1069. Most  of  the above should be no surprise to you,  but  let's
  1070. take  a  closer look at a few of the less clear items. First,
  1071. to  allow  a user to use the FTP command 'cd' to get  into  a
  1072. directory  any of the rights is sufficient. So, a  user  that
  1073. has 'read', 'write', 'delete', 'execute', 'list', 'make',  or
  1074. 'remove'  can  change to the directory in  the  access  path.
  1075. Conversely, if a path is specified without any access  rights
  1076. (except maybe for 'Inherit') then the user has no access what-
  1077. so-ever to this path.
  1078.  
  1079. A  user has 'write' access to a file or path, but no 'delete'
  1080. access, can upload files to the server as long as they do not
  1081. exist  already. This is good for an upload directory, because
  1082. it  allows  uploads without the chance of changing previously
  1083. uploaded files.
  1084.  
  1085. 'Execute' access is meant for remotely starting programs  and
  1086. usually  applies  to specific files. Be careful  in  granting
  1087. this right: For example, allowing a user to start COMMAND.COM
  1088. also  means that this user can delete anything on  your  hard
  1089. disk! More on using this in the 'How to execute programs  via
  1090. FTP with Serv-U' section.
  1091.  
  1092. If  you want a user to be able to see a directory listing you
  1093. need  to  specify 'list' access. This is often  used  in  the
  1094. opposite  way: For example for an upload directory you  would
  1095. want  a  user  to be able to upload files, but  not  see  and
  1096. certainly  not download anything that is already there.  This
  1097. could  be  done  by  only specifying the 'write'  right,  and
  1098. leaving 'list' access unchecked.
  1099.  
  1100. A  somewhat strange attribute in the list is 'inherit'.  This
  1101. does  not  so much say anything about access for a path,  but
  1102. how that access rule works for subdirectories. When 'inherit'
  1103. is  checked  the  rule will automatically be  valid  for  all
  1104. subdirectories  of  the  path  in  the  rule,  as  if   these
  1105. subdirectories  inherit  the access  rule.  This  is  usually
  1106. convenient, it means that with a single access rule  you  can
  1107. control access to a whole branch in the directory tree. Also,
  1108. if a user is allowed to create subdirectories, they will have
  1109. the same access rights as the parent if 'inherit' is checked.
  1110. In short, you are going to want to leave 'inherit' checked in
  1111. most  cases,  but sometimes it can be convenient  to  specify
  1112. access  for  a  single directory in a tree without  affecting
  1113. subdirectories  and that's when unchecking  it  can  come  in
  1114. handy.
  1115.  
  1116. When  a  user  executes an FTP command  concerning  files  or
  1117. directories, the user's access path list is checked to see if
  1118. the  command should be allowed to proceed. Now pay very close
  1119. attention, this is the part of Serv-U that seems  to  be  the
  1120. least  understood: The list is evaluated from top to  bottom,
  1121. and  evaluation stops as soon as an applicable rule is found.
  1122. 'Applicable' means that if it is a file the user wants to  do
  1123. something with, then the file name must appear in the  access
  1124. path  list, or the directory of the file must be in the list,
  1125. or  finally, a parent directory of the file must  be  in  the
  1126. path  list  with 'inherit' checked. Directory access  uses  a
  1127. similar mechanism. It follows from this that THE ORDER OF THE
  1128. PATH ACCESS RULES IS IMPORTANT!!! Unless the access rules are
  1129. in the right order you will not get the result you want!
  1130.  
  1131. Since  one  example  can say more than a thousand  words,  or
  1132. something  along  that  line, let's work  through  a  typical
  1133. situation. Assume you want to setup an 'Anonymous' FTP  site.
  1134. This  needs a directory tree with all the goodies  the  users
  1135. might want to download, for which they need read access.  You
  1136. also  need  an  upload directory where users can  upload  new
  1137. goodies,  but you don't want others to be able to immediately
  1138. get  their greedy fingers on it, since you want to check  for
  1139. viruses first. So, this upload directory needs write  but  no
  1140. read  access. We decide to put everything on the big  network
  1141. drive,  'Y:', under the 'ANONFTP' directory. We  also  create
  1142. the  'UPLOAD' directory here for uploads. In Serv-U we  would
  1143. create  the  user 'Anonymous' with the following access  path
  1144. rules (and in this order):
  1145.  
  1146.      Y:\ANONFTP\UPLOAD     - write, inherit rights
  1147.      Y:\ANONFTP            - read, list, inherit rights
  1148.  
  1149. Reversing the rules will not work: If a user tries  to  write
  1150. to  the  upload directory, the security mechanism will  check
  1151. against   Y:\ANONFTP   and  conclude   that   UPLOAD   is   a
  1152. subdirectory, so the rule applies, and the rule  grants  only
  1153. read and list access. Please take note that write access does
  1154. not  allow  a user to get a directory listing of  the  UPLOAD
  1155. directory,  so  not  only won't a user be  able  to  download
  1156. anything from there, the user cannot even see what files  are
  1157. uploaded.
  1158.  
  1159. If  the drive letter is left out of a path, it applies to all
  1160. drives. So, a fast way to get full access to all files on all
  1161. drives is:
  1162.  
  1163.       \                    - read, write, delete, list, make,
  1164.                              remove, and inherit rights
  1165.  
  1166. Now, the same mechanism that determines access to directories
  1167. also  applies  to  files. It is possible to grant  access  to
  1168. specific  files on a per-file basis. Let's take the  previous
  1169. example about the anonymous FTP server. We want to put a file
  1170. 'SECRET.TXT' in the ANONFTP directory, but nobody is  allowed
  1171. to  read  it of course. So, our access paths list would  look
  1172. like this:
  1173.  
  1174.      Y:\ANONFTP\SECRET.TXT - no rights
  1175.      Y:\ANONFTP\UPLOAD     - write, inherit rights
  1176.      Y:\ANONFTP            - read, list, inherit rights
  1177.  
  1178. Again,  the  order of the paths is important!  The  directory
  1179. access   rights   do   not  have  any  meaning   for   files.
  1180. Alternatively,  if SECRET.TXT was a directory  instead  of  a
  1181. file,  the above settings would keep users completely out  of
  1182. this directory.
  1183.  
  1184. 2.5 How to Setup Anonymous Access
  1185. ---------------------------------
  1186. Since setting up anonymous access is such a common task  when
  1187. running a FTP server, I want to present a separate section on
  1188. this  subject. It is not much different from setting  up  any
  1189. other user, so this is going to be a 'follow the recipe' kind
  1190. of instruction, with the specifics for anonymous thrown in.
  1191.  
  1192. First,  a  tip:  If you are running Windows 95  it  might  be
  1193. worthwhile to create a new 'DriveSpace 3' volume with all the
  1194. files  you  want to make available for anonymous FTP  access.
  1195. This  not only provides you with a lot more space due to  the
  1196. compression  (which at regular FTP speeds has  no  impact  on
  1197. performance),  but also effectively isolates the  users  from
  1198. more sensitive areas like your C: drive. So, for the rest  of
  1199. this story I will assume you just created a DriveSpace volume
  1200. named 'F:'.
  1201.  
  1202. Let's say all the good stuff for our users is going to be  in
  1203. subdirectories of F:\ANONFTP, and we want to allow uploads of
  1204. new files to the F:\ANONFTP\UPLOAD area.
  1205.  
  1206. The  first task in setting up anonymous access is creating  a
  1207. user  with  this name. Thus, go ahead, pull up the  'Setup  -
  1208. Users' menu and its dialog box. Fill in the 'Username'  field
  1209. with 'Anonymous'. The 'Group name' and 'Password' fields stay
  1210. blank, since they are ignored for anonymous anyway. Now,  the
  1211. 'Home  directory'  field needs to be set to F:\ANONFTP  since
  1212. that  is  the point we want the users to start when they  log
  1213. in.
  1214.  
  1215. We're  almost there, but the users still need access to those
  1216. directories.  So click the 'Add' button and  enter  the  path
  1217. F:\ANONFTP.  When this is done the access rights are  already
  1218. set,  since the default of 'read', 'list', and 'inherit'  are
  1219. exactly  what  we  want. Now for the upload directory:  Click
  1220. 'Add'  again and fill in F:\ANONFTP\UPLOAD. Serv-U will place
  1221. this above the previously entered access rule, which is good.
  1222. However,  the access rights are not exactly what we want,  so
  1223. uncheck 'read', check 'write' and uncheck 'list'. You  should
  1224. now  have the following two access rules in the list (In this
  1225. order!):
  1226.  
  1227.      F:\ANONFTP\UPLOAD     - write, inherit rights
  1228.      F:\ANONFTP            - read, list, inherit rights
  1229.  
  1230. This  is  all we have to do in the 'Setup Users'  dialog  box
  1231. itself,  but  there  are  some things  in  the  miscellaneous
  1232. section that are useful, so press the 'Misc' button. Once  in
  1233. there, check  the 'Show path relative to homedir' button'. It
  1234. causes anonymous users to see all directories and path  names
  1235. relative to their home directory. So, if your anonymous users
  1236. have  'F:\ANONFTP' as their home directory, they will receive
  1237. back  '/'  when they inquire with the PWD command. Similarly,
  1238. every  reference they make to a file or a change of directory
  1239. is  taken  relative to this path. The main reason  it  is  in
  1240. there  is  because most WWW browsers need 'change  directory'
  1241. access  to the '/' (=root) directory to make them work.  This
  1242. way  they believe they have access to the root and are happy,
  1243. while  on a PC you don't always want to give users access  to
  1244. your  real  root directory. The disadvantage of  having  this
  1245. mechanism  is  that anonymous users are restricted  to  their
  1246. home  directory and below, nor do they have access  to  other
  1247. drives.  Sometimes you want them to be able  to  have  access
  1248. outside their home directory tree and unchecking this  option
  1249. will  allow  that. Anonymous users will then be treated  like
  1250. any  other user as far as path names are concerned  and  they
  1251. will be able to change to parallel paths and other drives  if
  1252. their  access rights permit this. The price you pay  is  that
  1253. unless  you provide some form of access to the root of  their
  1254. home directory, i.e. 'F:\' in our example, WWW browsers won't
  1255. be able to log in.
  1256.  
  1257. When they log in we want to let them know the especially good
  1258. things and give them instructions on how to upload, and to do
  1259. that we need a login message file. Netscape will show such  a
  1260. message  in  a  very nice way, at the top  of  the  directory
  1261. listing.  So, let's create a file named LOGANON.TXT with  the
  1262. following contents:
  1263.  
  1264.      Welcome %name from %IP!
  1265.      For the latest in nature's feline beauty see directory IMAGES
  1266.      You can hear them in the directory MEOW
  1267.      Please keep uploads smaller than 100 Kb and place them in UPLOADS
  1268.  
  1269. Since  I  can imagine that not everyone envisions  cats  when
  1270. hearing  about 'pretty pictures' please feel free  to  change
  1271. the  text  according to your wishes! The words starting  with
  1272. '%'  are directives to Serv-U which will be replaced by  real
  1273. text  when the user logs in. '%name' becomes the user's name,
  1274. and  '%IP'  either the IP number or the IP name of  the  user
  1275. (whichever  is available). There are many more '%' directives
  1276. and you can find more information about these in the 'How  to
  1277. use sign-on and/or sign-off messages' section.
  1278.  
  1279. Now  let's  place the file LOGANON.TXT in F:\ and thus  enter
  1280. F:\LOGANON.TXT in the 'Message file' field.
  1281.  
  1282. To  store  our  settings press 'OK', and in  the  user  setup
  1283. dialog box press 'Store'.
  1284.  
  1285. There  are a few more things that are important for anonymous
  1286. access.  They  can all be found in the 'Setup -  FTP  Server'
  1287. menu  choice. The first field of interest to us is  'Max  no.
  1288. anonymous', this determines how many anonymous users  can  be
  1289. logged in at the same time. If you leave this blank then Serv-
  1290. U will allow any number. Use your own judgment what you think
  1291. your  machine can handle. Next is 'Time-out anonymous'.  This
  1292. determines how long Serv-U will wait when anonymous users are
  1293. not  doing  anything before kicking them off the server.  The
  1294. default  of  15 minutes is a good value, still allowing  slow
  1295. transfers  and  bad  connections to work  while  keeping  the
  1296. server reasonably clean of all those Netscape users that stay
  1297. logged in after their transfer is long done. Setting the time-
  1298. out  to  0 or leaving it blank means that Serv-U won't  check
  1299. how long a user has been idle.
  1300.  
  1301. The last item we need to concern ourselves with for anonymous
  1302. users is the 'Check anon. passwords' option. By default  this
  1303. is  unchecked,  which  means that anonymous  users  can  type
  1304. anything  as  a  'password' to get into the server.  If  this
  1305. option is checked, then Serv-U makes sure that the 'password'
  1306. entered by anonymous users is something that looks like an E-
  1307. mail address. Netiquette prescribes that anonymous users send
  1308. their E-mail address as a password, alas this good custom  is
  1309. disappearing fast and version 2.0 of Netscape does  not  even
  1310. have  the ability to do this anymore. So, unless you want  to
  1311. severely restrict access and teach people good manners it  is
  1312. probably best to leave this unchecked.
  1313.  
  1314. Just  so  you  know: As is customary for FTP servers,  Serv-U
  1315. also  looks for a '-' (hyphen) as the first character of  the
  1316. anonymous  'password'. If present, all  login  and  directory
  1317. change messages are suppressed.
  1318.  
  1319. Well,  you made it through and now know just about everything
  1320. there  is to know about setting up anonymous access  to  your
  1321. server. You can enhance things further with sign-on and sign-
  1322. off  messages, directory change messages and links, which are
  1323. covered in the following sections.
  1324.  
  1325. 2.6 How to Use Groups
  1326. ---------------------
  1327. To ease the burden of maintaining a large site somewhat, Serv-
  1328. U  uses  the  concept of 'groups'. This allows you  to  group
  1329. together  users  with similar settings. All the  similarities
  1330. are  stored  in  the  group  information,  leaving  only  the
  1331. differences per user for you to set up.
  1332.  
  1333. To  edit groups select the 'Setup - Groups' menu choice.  The
  1334. dialog box you see should look familiar by now: It's the same
  1335. one  as  for the user setup. So, if you know how  to  set  up
  1336. users, you also know how to set up groups! The only item that
  1337. is not applicable for groups is the 'Username' field, so this
  1338. is  grayed  out,  instead you use the 'Group name'  field  to
  1339. specify the name of the group you are editing.
  1340.  
  1341. To  show  the power of groups a quick example: Let's say  you
  1342. are  the Pentagon system administrator and want to create FTP
  1343. access for everybody in case they are on field trips. So, you
  1344. hook  up  this old PC to the net, install Serv-U and register
  1345. it  (Hypothetical situation). Then you proceed  to  create  a
  1346. group 'StarWars'. Now you go on to set the password for  this
  1347. group to 'RonaldR', and their home directory (all their files
  1348. are shared anyway) to 'y:\super\secret\starwars'. You fill in
  1349. some  access path rules as well, and you're all set: The only
  1350. thing  left  is  entering the user names, you don't  have  to
  1351. provide any other information per user. A 10 minute job.
  1352.  
  1353. Now  there's this occasional guest user, 'BillyC'. You  don't
  1354. want  him to get into certain directories, so you make him  a
  1355. member  of the group but specify those secret directories  in
  1356. his access path rules with 'no access', and you're all done.
  1357.  
  1358. As  you  already  saw  from  the previous  example  the  user
  1359. settings have precedence over the group settings. This allows
  1360. you  to  selectively  override certain  parts  of  the  group
  1361. settings,  making groups a very flexible mechanism  for  user
  1362. maintenance.  To  summarize: Serv-U first checks  the  user's
  1363. settings, then looks if the user is part of a group and if so
  1364. uses  this group's settings, and finally, if nothing is found
  1365. yet  the settings of a user with name 'ALL' are used if  they
  1366. exist.  The  only  user that cannot be used together  with  a
  1367. group  is  'Anonymous'. For security reasons  only  the  user
  1368. settings themselves are used here.
  1369.  
  1370. Well, by now you know most of what there is to know to run  a
  1371. smooth Serv-U FTP server. The next sections are mostly  about
  1372. goodies  that make life easier or more colorful. Next  you'll
  1373. learn how to find out what users are doing on your server and
  1374. if they are nasty, how you can boot them off.
  1375.  
  1376. 2.7 How to See Who is Logged In
  1377. -------------------------------
  1378. Even  though Big Brother might not be watching you,  you  can
  1379. certainly  watch your users! Select the 'File  -  User  Info'
  1380. menu  choice  and  up pops the user information  window.  The
  1381. upper  part shows a list of all users currently connected  to
  1382. your  server. By clicking with the mouse on one of the  users
  1383. you  can  get extra information about that user in the  lower
  1384. part of the window.
  1385.  
  1386. There  are  a  few  things  to keep in  mind  concerning  the
  1387. displayed  statistics: The IP name is found by  initiating  a
  1388. reverse DNS lookup of the IP number. It can take time  before
  1389. an answer comes back from the DNS server, and there are quite
  1390. a  few IP numbers that do not have an IP name. So, it is  not
  1391. at all unusual for a user not to have an IP name.
  1392. Then,  the  transfer speed displayed should not be taken  too
  1393. absolute.  Since the socket stack buffers any  send  activity
  1394. (Serv-U can write lots of bytes to the stack in a very  short
  1395. time, after which the stack sends it off at its leisure)  the
  1396. indicated speed can be much higher than it actually is. Also,
  1397. if  there are local transfers going on with a very high speed
  1398. then Serv-U and the socket stack can get into a tight loop of
  1399. sending or receiving, and the user information might not  get
  1400. updated  for  some time. This is normal ("Not a  bug,  but  a
  1401. feature!").
  1402.  
  1403. This  brings us to the 'Show Commands' button. Pressing  this
  1404. will  pop up another window which will show you all  the  FTP
  1405. commands  the  user  sends and the replies  from  Serv-U.  It
  1406. tracks  the commands of the in 'User Info' selected user  and
  1407. by clicking on another user you can switch.
  1408.  
  1409. The  last  button of interest in this window has the  prosaic
  1410. name  'Kill  User'. This is the place where, if so  inclined,
  1411. you  can  alleviate all your frustration after a particularly
  1412. bad  day  at the job. For that reason the entire next section
  1413. is devoted to it.
  1414.  
  1415. 2.8 How to Kick a User Off the Server
  1416. -------------------------------------
  1417. If  someone is doing things you don't like, or you just  want
  1418. to be mean, Serv-U offers you the option of kicking that user
  1419. off your server and keeping him or her off.
  1420.  
  1421. This is done by selecting the 'File - User Info' menu choice.
  1422. In the window that pops up as a result you select the user-to-
  1423. be-killed,  and proceed by pressing the 'Kill  User'  button.
  1424. This  will  pop up a little dialog box asking you  if  you're
  1425. really sure about this, and offering several options to  keep
  1426. the user in question off on a more permanent basis.
  1427.  
  1428. You  will see two checkboxes. The first is 'Refuse IP  access
  1429. in  future'. If you check this and then press 'OK' the user's
  1430. IP  address will be added to the list of IP numbers that  are
  1431. refused  access. This will prevent that user from logging  in
  1432. again,  or at least it not from the same IP number.  We  will
  1433. talk  about  access and IP numbers in greater detail  in  the
  1434. 'How to limit access by IP number section'.
  1435.  
  1436. The  second  checkbox is 'Disable account' and checking  this
  1437. does exactly that: The 'Enable' checkbox in the 'Setup Users'
  1438. dialog box will be unchecked. Nobody will be able to use that
  1439. login name until the account has been enabled again.
  1440.  
  1441. 2.9 How to Setup Logging
  1442. ------------------------
  1443. When  you  select the 'Setup - Logging' menu choice you  will
  1444. see  a dialog box that lets you specify what events you  want
  1445. to  log and where to log them to: either to screen only or to
  1446. both the screen and a logfile.
  1447.  
  1448. The first two items deal with logging to a logfile. The first
  1449. one,  'Enable logging to file' switches writing to a  logfile
  1450. on  or  off. The second item, 'Logfile' is meant for entering
  1451. the  path  and  file  name into which all  the  messages  are
  1452. written.  Of  course, logging will only  work  when  a  valid
  1453. logfile  name  is  entered, it has to be  a  full  path  name
  1454. including a drive letter.
  1455.  
  1456. Serv-U  gives you a wide choice in what should be  logged  or
  1457. not. In all there are seven different categories that can  be
  1458. individually  enabled  or  disabled.  The  items   are   self
  1459. descriptive  except maybe for three: 'Log FTP commands'  logs
  1460. every  command as it is received by the server and  'Log  FTP
  1461. replies' logs the command replies that are sent back  by  the
  1462. server  to the client. These two options are mainly  intended
  1463. for  diagnostic purposes and are switched off by default. The
  1464. last  option is 'Log IP names' and when checked, Serv-U  will
  1465. try  to  find  the IP name of a user by doing a  reverse  DNS
  1466. lookup  on  the IP number. Keep in mind that DNS lookups  can
  1467. take  just  about any amount of time, cost a fair  amount  of
  1468. overhead,  and  not all IP numbers have a IP name  associated
  1469. with  it. When this option is checked the IP name of  a  user
  1470. will be logged as soon as it becomes available.
  1471.  
  1472. Messages  are always logged to the Serv-U window,  regardless
  1473. of  the logfile settings. There is no difference between  the
  1474. messages on screen and the ones in the logfile, although some
  1475. things  are  only shown on screen. The latter are server  and
  1476. program  related matters, like version number,  server  going
  1477. on/off-line etc.
  1478.  
  1479. Log  messages  always have the same layout.  The  reason  for
  1480. using such a strict format is to make it easier to search for
  1481. specific  messages  or certain types of messages.  This  also
  1482. makes  it  possible  to  do automatic accounting  by  machine
  1483. reading  the logfile if you need it. The logfile can be  read
  1484. or  copied at any moment, even when Serv-U is running (It  is
  1485. also  possible to get the file via FTP using Serv-U itself!).
  1486. The format is as shown below, in stylized form:
  1487.  
  1488.      [n] DATE TIME - (xxxx) MESSAGE
  1489.  
  1490. The first number, 'n', indicates the type of message that  is
  1491. being logged. Currently there are seven different categories:
  1492.  
  1493.      1    - system messages (problems etc.)
  1494.      2    - FTP commands (from client to server)
  1495.      3    - GET file transfers
  1496.      4    - PUT file transfers
  1497.      5    - security related events (users logging in etc.)
  1498.      6    - FTP replies (from server to client)
  1499.      7    - WinSock socket stack activity (only  used  for
  1500.             diagnostics)
  1501.  
  1502. The  second  number, 'xxxx', is a unique  ID  assigned  to  a
  1503. client  the  moment  the  connection  is  made.  All  further
  1504. messages  concerning that client will use  the  same  number.
  1505. Again,  this  was  done  to  make it  easy  to  do  automated
  1506. accounting,  or,  to  find  back events  using  the  'search'
  1507. facilities of every editor.
  1508.  
  1509. You  can  rename, move or delete a logfile at any time  while
  1510. the  server is running, there is no need to stop the  server.
  1511. You  can even copy a logfile to a remote system using  Serv-U
  1512. itself!  If you want to temporarily stop logging to file  and
  1513. see  it  on screen only, you can uncheck the 'File - Logging'
  1514. option  in  the  main menu. Needless to say this  has  to  be
  1515. checked to enable logging to file.
  1516.  
  1517. One more note: If you log GETs and PUTs then Serv-U will also
  1518. tell you the average transfer speed. For GETs the value Serv-
  1519. U  shows can be a bit optimistic, especially for small files,
  1520. as  a result of the socket stack buffering the bytes that are
  1521. sent over the network. Serv-U can very quickly transfer 10-20
  1522. Kbytes into the socket stack, which then proceeds to send  it
  1523. over  the network at its own leisure. However, Serv-U has  no
  1524. way  of finding out when the actual transfer is complete, and
  1525. assumes  that when it has sent the block to the socket  stack
  1526. it is done.
  1527.  
  1528. Enough boring talk, let's get back to the fun part! Next will
  1529. be  explained how you can pour your heart out to  your  users
  1530. through all kinds of messages.
  1531.  
  1532. 2.10 How to Use Sign-on and/or Sign-off Messages
  1533. ------------------------------------------------
  1534. Your  FTP-server can display a welcome message every  time  a
  1535. user connects to it. This can be very useful to provide users
  1536. with  information about your FTP server, like where  to  find
  1537. games, or 'Serious Software'. Likewise, you might want to say
  1538. good-bye to them when they leave, or remind them to send that
  1539. check  . . . The way to do this is by entering a text in  the
  1540. 'Sign-on/Sign-off' dialog box which pops up when  you  choose
  1541. the 'Setup - Signon/off' menu choice.
  1542.  
  1543. There  are several special words that you can enter  in  your
  1544. sign-on and sign-off text which get expanded while being sent
  1545. to a client. They all begin with '%'. Here is the list:
  1546.  
  1547.      %Time       - displays the current time on your PC
  1548.      %Date       - displays the current date on your PC
  1549.      %UNow       - displays the current number  of  Serv-U
  1550.                    users connected
  1551.      %UAll       - displays the number of users since  the
  1552.                    server was started
  1553.      %U24h       - displays the number of users in the  last
  1554.                    24 hours
  1555.      %MaxUsers   - displays the maximum no. of users, as set
  1556.                    in 'Setup - Server'
  1557.      %MaxAnonymous - the maximum no. of anonymous users, as
  1558.                    set in 'Setup - Server'
  1559.      %Name       - displays the user's login name
  1560.      %IP         - displays the user's IP number or name  if
  1561.                    available
  1562.      %Dir        - displays the user's current directory
  1563.      %Disk       - displays the user's current disk drive
  1564.      %DFree      - displays the amount of free disk space on
  1565.                    the user's current disk in Kb
  1566.      %FUp        - displays the number of files uploaded  by
  1567.                    the current user
  1568.      %FDown      - displays the number of files downloaded
  1569.      %FTot       - displays  the  total  number  of  files
  1570.                    transferred
  1571.      %BUp        - displays the number of Kbytes uploaded by
  1572.                    the user
  1573.      %BDown      - displays the number of Kbytes downloaded
  1574.                    by the user
  1575.      %BTot       - displays  the total  number  of  Kbytes
  1576.                    transferred
  1577.      %TConM      - displays the total connect time in minutes
  1578.      %TConS      - displays the connect time in seconds - to
  1579.                    be used with '%tconm'
  1580.      %RatioUp    - displays the 'upload' ratio part for UL/DL
  1581.                    ratios
  1582.      %RatioDown  - displays the 'download' ratio  part  for
  1583.                    UL/DL ratios
  1584.      %RatioCredit - displays the current download  credit
  1585.                    for UL/DL ratios (Kb or 'files')
  1586.      %QuotaUsed  - displays how much disk quota is used in Kb
  1587.      %QuotaLeft  - displays how much disk quota is left in Kb
  1588.      %QuotaMax   - displays the maximum amount of disk space
  1589.                    that can be used in Kb
  1590.  
  1591. Not  all  of these directives make sense for both the  signon
  1592. and signoff text: There is little point in putting '%disk' in
  1593. the  signon  message, since the user is not  yet  logged  in.
  1594. Likewise  for  some  other directives.  However,  these  same
  1595. directives can also be used in directory change messages  and
  1596. login  messages, which are covered in the following sections.
  1597. There they can be very useful.
  1598.  
  1599. You could make the following signon text:
  1600.  
  1601.       Welcome, it is %time on %date, and you are user  number %unow
  1602.       Over the last 24 hours, %u24h people have visited  this site
  1603.  
  1604. I'm  sure  you'll figure out by yourself what this will  look
  1605. like to the user . . .
  1606. Please  keep  in  mind that the average client  has  only  80
  1607. characters per line, and the first four are taken up  by  the
  1608. reply code. So keep your lines short if you want the users to
  1609. actually see your prose.
  1610.  
  1611. 2.11 How to Setup User Specific Login Messages
  1612. ----------------------------------------------
  1613. After  astonishing the user with your signon message you  can
  1614. go  for  the  kill  by also providing a user  specific  login
  1615. message.  These messages should be put in one  or  more  text
  1616. files  and  the file name can be filled out in the  users  or
  1617. groups  setup dialog box, in the 'Message file' field of  the
  1618. miscellaneous part, i.e. press the 'Misc' button in the  user
  1619. or group box to get there.
  1620.  
  1621. The  file name you enter in the 'Message file' field can have
  1622. several forms: You can use an absolute path with a drive, for
  1623. example  C:\FTP\LOGMES.TXT. This will of course  make  Serv-U
  1624. use  this  file. You can also specify only the name,  and  no
  1625. path, for example LOGMES.TXT. This will cause Serv-U to  look
  1626. in the user's home directory for this file and if it is there
  1627. it will be displayed to the user. Finally, you can specify  a
  1628. path  but no drive letter, for example \FTP\LOGMES.TXT.  This
  1629. means  that  Serv-U  will add the drive of  the  user's  home
  1630. directory  to  make  a  full path. The  latter  two  ways  of
  1631. specifying the file can be very useful for groups, i.e.  with
  1632. just  a single file name set up you can provide all the users
  1633. that are part of that group with a separate login message.
  1634.  
  1635. Of  course,  you can use all the '%' directives mentioned  in
  1636. the previous section in login messages. Try for example:
  1637.  
  1638.      Hello %name from %IP!
  1639.  
  1640. With a little luck Serv-U will have found the IP name of  the
  1641. user  by the time he or she logs in. So you can impress  them
  1642. by   showing  you  know  where  they  are  (Big  Brother   IS
  1643. Watching!).  By the way, Netscape displays the login  message
  1644. in  a  nice looking way at the top of the screen (The sign-on
  1645. message does not get displayed by Netscape).
  1646.  
  1647. 2.12 How to Use Directory Change Messages
  1648. -----------------------------------------
  1649. It  can be very useful to tell a user some specifics when  he
  1650. enters  a  directory. For this purpose Serv-U  has  directory
  1651. change  messages. There can be a different message  for  each
  1652. directory.
  1653.  
  1654. As with the login messages, the directory change message text
  1655. should be stored in a file. In the 'Setup - FTP Server'  menu
  1656. choice you can specify which file name Serv-U should look for
  1657. when  the  user changes directory. You can specify  the  file
  1658. name  in two different ways: First is an absolute file  name,
  1659. for  example  C:\FTP\CDMES.TXT. As  you'd  expect  this  will
  1660. display  that  file  for each directory change.  Then  it  is
  1661. possible  to  use  a  file name only without  the  path,  for
  1662. example CDMES.TXT. This will make Serv-U look for and display
  1663. the file with that name, in the directory into which the user
  1664. is changing. The latter one is the usual way to use directory
  1665. change  message files, since this enables you  to  specify  a
  1666. different message for each directory.
  1667.  
  1668. The  server  setup dialog box has room for  a  'primary'  and
  1669. 'secondary' directory change message file. When looking for a
  1670. message file, Serv-U will first try the primary file name. If
  1671. there  is no file name specified in there, or the file cannot
  1672. be  found,  the  server will try to find the  secondary  file
  1673. name.  This  is  very useful in case you  have  specific  dir
  1674. change  message files for some directories, using a  relative
  1675. file  name as the primary directory change message file.  You
  1676. can  then  set  up  an absolute file name  as  the  secondary
  1677. directory  change message file. This will show the users  the
  1678. primary file message when available, and the secondary one if
  1679. there is no primary (For example because it's a CD-ROM so you
  1680. cannot   place   directory  change  message  files   in   its
  1681. directories).
  1682.  
  1683. Like sign-on and sign-off messages you can use any of the '%'
  1684. directives in directory change messages. Take a look  at  the
  1685. previous sections for a list of all directives.
  1686.  
  1687. Netscape will display those directory change messages at  the
  1688. top  of  the page. One more trick: If you enabled  the  'Hide
  1689. hidden  files' feature in the miscellaneous user  setup,  you
  1690. can  hide  the directory change message file itself from  the
  1691. user  by making it 'hidden'. Hidden files are files with  the
  1692. DOS/Windows  'hidden'  attribute set, something  you  can  do
  1693. using   the   DOS  program  'Attrib'  or  by   changing   the
  1694. 'properties'  of  a  file  in Win95 (using  the  right  mouse
  1695. button). So, if you make your directory change message  files
  1696. hidden  they  won't show up in the directory  listings  while
  1697. users still get to see the messages.
  1698.  
  1699. 2.13 How to Use Links a la UNIX
  1700. -------------------------------
  1701. Now  for  the  piece de resistance (pardon my French),  which
  1702. sets Serv-U miles apart from any other FTP server that I know
  1703. of for MS-Windows: Links!
  1704.  
  1705. If  you know UNIX then you know what I am talking about  when
  1706. links  are  mentioned. If not, then try the following:  Links
  1707. are  names  of  files and/or directories that appear  in  the
  1708. directory listing but they are not in the directory that  the
  1709. user  is  listing. Rather, they point to the actual directory
  1710. or  file and can be used by the user as if they were the real
  1711. thing  itself. A little like the Windows 95 'shortcuts',  but
  1712. more  real: When you delete a link through Serv-U the  actual
  1713. file  or  directory is gone! The great value of links  is  in
  1714. showing users that you have all kinds of goodies available on
  1715. other  disk drives. The user can then simply 'cd' to  a  link
  1716. and   thus  change  to  a  completely  different  drive   and
  1717. directory.
  1718.  
  1719. The  way  Serv-U works with links is by reading them  from  a
  1720. text  file.  You can have different files and thus  different
  1721. links  for  each  directory, much in  the  same  way  as  the
  1722. directory  change messages work in the previous section.  The
  1723. file  name  is  entered via the 'Setup  -  FTP  Server'  menu
  1724. selection  (Guess  where!). The server  setup  will  let  you
  1725. specify  a  primary and secondary link file. During  use  the
  1726. server  will first try to find the primary link file, and  if
  1727. that  one doesn't exit it'll try the secondary file name.  As
  1728. with  message  files there are several ways to specify  which
  1729. file  Serv-U should use for links: You can enter a file  name
  1730. by  itself, for example LINKS.TXT. This makes the server look
  1731. in the user's current directory for a file with this name and
  1732. if found it is merged into the directory listing. This is the
  1733. way  to  set up different link files for each directory.  The
  1734. second  method is by specifying a full path name, for example
  1735. C:\FTP\LINKS.TXT. As you'd expect the result will be that the
  1736. same  links  are  shown in each directory. Finally,  you  can
  1737. leave out the drive letter, for example \FTP\LINKS.TXT, which
  1738. means  Serv-U  adds the current drive to the  name  and  then
  1739. looks  for the file. Useful for setting up links that  change
  1740. per drive, but not per directory. If you make the link file's
  1741. attribute 'hidden' and enable the 'Hide hidden files' feature
  1742. in  the miscellaneous section of the user or group setup then
  1743. users  won't  see  the file itself appear in their  directory
  1744. listings while they still get to see the links.
  1745.  
  1746. In a typical situation you'd specify a relative path name for
  1747. the  primary  link file, and an absolute path  name  for  the
  1748. secondary link file. For example, if you enter the file  name
  1749. LINKS.TXT as the primary file name Serv-U will look for  this
  1750. file  in  the  users  current directory. This  lets  you  use
  1751. different  LINKS.TXT files for different directory, typically
  1752. with links specific to that directory. You'd then put all the
  1753. links you want to always show the user, even when they are on
  1754. a  CD-ROM,  in  a secondary link file with an  absolute  path
  1755. name, let's say C:\SERV-U\ABSLINKS.TXT. A good candidate  for
  1756. the  secondary link file would be a link to the  user's  home
  1757. directory.
  1758.  
  1759. Now, what should a link file look like? Each line of the file
  1760. describes a different link. First comes the link name,  which
  1761. is  what  the user is going to see in the directory  listing,
  1762. then a '|' which acts as a separator, and finally the file or
  1763. path  that the link should point to. Here is an example  link
  1764. file that should make all this a little clearer:
  1765.  
  1766.      D-Drive         | d:\
  1767.      CD-ROM          | f:\
  1768.      Home            | ~
  1769.      Fun Stuff       | g:\public\games
  1770.      One up          | ..
  1771.      Pointless       | \junk\..\more\..
  1772.      Poem            | c:\culture\poem.txt
  1773.  
  1774. As  far  as the user is concerned links behave like the  real
  1775. thing: They can be used for 'cd ' if it's a directory,  'get'
  1776. for  a  file  etc. Only difference is that  if  a  link  gets
  1777. deleted  the file or directory it points to will get  deleted
  1778. but  the  link  will  continue to show up  in  the  directory
  1779. listing. Needless to say that it is your responsibility  that
  1780. the links in a link file point to something that makes sense.
  1781.  
  1782. So  much  for the fun part, back to more serious matter  with
  1783. more  about how to select whom you want to let on your server
  1784. and whom to bounce.
  1785.  
  1786. IMPORTANT  NOTE: A point that seems to cause  much  confusion
  1787. and  is the source of much of the E-mail I'm receiving is the
  1788. effect of links and using the 'Show path relative to homedir'
  1789. feature in the miscellaneous dialog box of the user and group
  1790. setup.  People will make all these beautiful links  to  other
  1791. drives, CD-ROMs and the like, then switch on 'relative paths'
  1792. and  act surprised their links don't work. Once again,  while
  1793. using 'relative paths' Serv-U will try to show the users path
  1794. relative to the home directory for that user. This only works
  1795. for paths at or below the user's home directory. For example,
  1796. if   the   homedir   is  C:\USERS\JIM,   then   a   link   to
  1797. C:\USERS\JIM\UPLOAD will work fine, but a link to E:\PICTURES
  1798. will not!
  1799.  
  1800. 2.14 How to Set Up Upload/Download Ratios
  1801. -----------------------------------------
  1802. Sometimes  you  want to force your users  to  upload  a  file
  1803. first, before they can download anything. Serv-U can do  this
  1804. for you, and more!
  1805.  
  1806. The setup for UL/DL ratios can be found in the user and group
  1807. setup  dialog boxes, by pressing the 'U/D Ratios' button.  In
  1808. general,  UL/DL ratios will let you specify how much  a  user
  1809. can  download for each upload. For example, if for a user the
  1810. ratio  is  set to 1 / 3 this means that for each  upload  the
  1811. user  can  download 3. So, after uploading  2  the  user  has
  1812. 'credit' for 6.
  1813.  
  1814. Serv-U  can handle two types of ratios: Either it  will  keep
  1815. track  of  the uploads and downloads for each time  the  user
  1816. logs  in separately (the 'per session' settings), or  it  can
  1817. keep  track  of  file transfers over multiple sessions,  even
  1818. while several clients are logged in using the same user  name
  1819. (the  'overall' settings). For each of the 'per session'  and
  1820. 'overall' choices Serv-U can count files (each file  uploaded
  1821. or downloaded counts as '1'), or it can count the actual file
  1822. sizes  in  bytes. Depending on which of the two is  used  the
  1823. ratio and credit setting will either mean 'files' or 'bytes'.
  1824.  
  1825. For  the  UL/DL  ratio  setting the actual  numbers  are  not
  1826. important. What counts is of course their ratio. For example,
  1827. setting  a upload/download ratio of 1 / 2 means (for 'files')
  1828. that each uploaded file gives the user two files 'credit' for
  1829. downloading.  Likewise, if bytes are  counted  each  uploaded
  1830. byte gives two bytes 'credit' for downloads.
  1831.  
  1832. Every  upload is converted into 'credit', and every  download
  1833. is  taken  from that credit. In a 'per session'  setting  the
  1834. credit  entry in the dialog box is intended for  entering  an
  1835. initial credit value that the user gets when logging in.  For
  1836. an  'overall' setting this is the actual current  credit  for
  1837. that particular user, which can be edited in the ratio setup.
  1838.  
  1839. There  is an important item which is closely related to UL/DL
  1840. ratios,  which  is named "free files". These are  files  that
  1841. will  not  be  counted for the upload/download  ratio  count,
  1842. something very useful for README.TXT files and the like.
  1843.  
  1844. "Free files" can be set up in the 'Setup Server' dialog  box,
  1845. by  pressing  the 'U/D Ratios' menu item. Just fill  out  the
  1846. file  name in the text edit box and press the 'Add' key. This
  1847. will  put  it  in the list which shows all the current  "free
  1848. files". The file name can be a name only, i.e. without  path.
  1849. That  way  any file with that name in any directory  will  be
  1850. free. For example, adding INDEX.TXT will make any file on the
  1851. system  with  that  name freely downloadable.  You  can  also
  1852. specify  a  full path in case only a specific file should  be
  1853. free.  For example C:\FTP\INDEX.TXT will make INDEX.TXT  free
  1854. only if it's in the C:\FTP directory. You can also leave  out
  1855. the  drive  letter,  which is taken to  mean  'for  all  disk
  1856. drives'.
  1857.  
  1858. The  free file names can contain wildcard characters: '*' and
  1859. '?'.  For example adding *.TXT will make all files ending  on
  1860. .TXT  free  on your system, or A???.TXT will make  all  files
  1861. starting with A followed by 3 other characters and ending  on
  1862. .TXT  free. Wildcard characters can also be used in  a  path.
  1863. For  example,  \*\*.TXT would make all files  on  all  drives
  1864. ending on .TXT free if they are in a sub-directory one  level
  1865. deep (like C:\FTP\INDEX.TXT would be).
  1866.  
  1867. 2.15 How to Limit Disk Usage of Users
  1868. -------------------------------------
  1869. Unless  you  have  deep pockets and consequently  large  hard
  1870. disks you are going to want to limit the amount of disk space
  1871. that  your  FTP users can occupy. Again Serv-U comes  to  the
  1872. rescue  by  letting you specify exactly how much a  user  can
  1873. use.
  1874.  
  1875. For  this  purpose the user and group setup  boxes  have  the
  1876. 'Quota' button which brings you to the disk quota dialog box.
  1877. In  there  you  have  two items: One to specify  the  maximum
  1878. amount  of  disk space a user can use, the other  to  specify
  1879. what  the  current amount is. Even though  the  setup  is  in
  1880. Kbytes, internally Serv-U is accurate up to the byte.
  1881.  
  1882. The  current amount lets you set up an initial value, in case
  1883. you are filling out the user's details for the first time. It
  1884. also  keeps track of the disk usage as time goes by, and  you
  1885. can thus change it whenever you feel like it.
  1886.  
  1887. 2.16 How to Limit Access by IP Number
  1888. -------------------------------------
  1889. The  'Setup - IP Access' menu choice will pop up a dialog box
  1890. which  provides  the  means to restrict access  to  your  FTP
  1891. server to certain IP-numbers. If  for example, you work at  a
  1892. university and only want your faculty members to be  able  to
  1893. access the server, then this is a great way to do it. In  the
  1894. upper left corner of the dialog box you can choose which type
  1895. of  rules  you want to specify: 'Deny' or 'Allow' rules.  The
  1896. deny  rules  decide who should be kept out, the  allow  rules
  1897. indicate  who should be welcomed. THE ORDER OF THE  RULES  IS
  1898. IMPORTANT! When a client contacts the server, the  rules  are
  1899. looked  at  FROM  TOP  TO  BOTTOM. The  first  matching  rule
  1900. applies, and evaluation is stopped. If there are no IP-access
  1901. rules everybody can enter the FTP server. As soon as there is
  1902. one  rule,  only those clients that pass the rule  check  are
  1903. allowed to enter.
  1904.  
  1905. You  can  select which type of rules you want to have  Serv-U
  1906. evaluate  first,  in  case  both deny  and  allow  rules  are
  1907. present. Just select the right one in the 'Evaluation  Order'
  1908. part.  This can be useful in case you need to specify  a  few
  1909. exceptions to a general rule.
  1910.  
  1911. You  can  type in a new rule in the 'Rule' edit and then  use
  1912. the  'Add'  button to add the rule to the list. The  'Remove'
  1913. button will remove the currently selected rule from the list.
  1914. To  change the order of the rules you have to select  one  by
  1915. clicking  the mouse on it, and then use the 'Up'  and  'Down'
  1916. buttons to move it around.
  1917.  
  1918. Rules  are  nothing more than IP-numbers  or  ranges  of  IP-
  1919. numbers. There are two special characters: the star  '*'  and
  1920. the  hyphen '-'. A star functions as a wildcard for  checking
  1921. the number. Any number will match that section of the rule if
  1922. it  is  a  star.  The  hyphen is used to denote  a  range  of
  1923. numbers. Simply separate the starting and ending values by  a
  1924. hyphen. For example, say all IP-numbers in your company  look
  1925. like 134.56.34.xxx with 'xxx' being any number. Now, you want
  1926. to  restrict  access to your FTP server to other  members  of
  1927. your  company only. The way to do it is to create an  'Allow'
  1928. rule that looks like this:
  1929.  
  1930.      134.56.34.*
  1931.  
  1932. That's  simple,  isn't it!? Likewise, if you  know  that  the
  1933. competition  has IP-numbers in the range 168.76.xxx.xxx,  you
  1934. can keep them out of your server with the 'Deny' rule:
  1935.  
  1936.      168.76.*.*
  1937.  
  1938. Now,  you  need  to  share some of  your  files  with  a  few
  1939. colleagues,  and management in your company is too  cheap  to
  1940. install a local network. You find out that their PC's have IP-
  1941. numbers  134.56.34.128, 134.56.34.129 and 134.56.34.130.  You
  1942. could  of course make three 'Allow' rules, each with  one  of
  1943. these  numbers. A faster way to do this is to make  a  single
  1944. rule like this:
  1945.  
  1946.      134.56.34.128-130
  1947.  
  1948. The  special characters '*' and '-' don't need to be  at  the
  1949. end  of the IP-numbers, any place will do. The rule 221.*.76-
  1950. 154.89 is perfectly OK. I wouldn't know when you'd need this,
  1951. but,  hey, the world is a strange place! Remember,  order  is
  1952. important  and  deny  rules are always evaluated  before  the
  1953. allow rules. Experiment a bit, and you'll get the hang of it.
  1954.  
  1955. Since  people  keep  asking me this: A few  words  about  the
  1956. security  of  IP-access rules. The check on IP number  stands
  1957. pretty  much at the top of the Serv-U security mechanism  and
  1958. all  connections  have  to pass through  this  rather  narrow
  1959. bottle  neck. The code that does the checking is quite simple
  1960. (In  contrast to the code that does the access rule  checking
  1961. for paths), so it is unlikely that there are any loopholes or
  1962. bugs  left in there. So, in my humble and honest opinion this
  1963. is  one  feature that makes for a very secure FTP  server  if
  1964. that is what you need!
  1965.  
  1966. 2.17 How to Print via FTP
  1967. -------------------------
  1968. Serv-U  also  allows  access to all PC  ports:  PRN:,  LPT1:,
  1969. LPT2:,  LPT3:, LPT4:, AUX:, COM1:, COM2:, COM3:,  and  COM4:.
  1970. This  can  be  a  convenient way of setting  up  a  'network'
  1971. printer by transferring files directly to PRN: or LPT1: using
  1972. FTP. These ports are treated like any regular path name, so a
  1973. user needs access rights to use them. Thus, to make a printer
  1974. on  PRN:  accessible and a modem on COM2: the user needs  the
  1975. following  access  rights in the 'Setup Users/Groups'  dialog
  1976. box:
  1977.  
  1978.      PRN:                  - write and delete rights
  1979.      COM2:                 - read, write and delete rights
  1980.  
  1981. There seems to be much confusion on how to actually use  this
  1982. feature,  therefore a short explanation. These  ports  behave
  1983. very  much like files that always exist and can be  found  in
  1984. every  directory  although they don't show  up  in  directory
  1985. listings. So, no 'cd' commands are needed, just transfer your
  1986. file-to-print  to the port with the printer.  For  a  command
  1987. line  FTP client this would look like 'put FILE.TXT PRN:'  to
  1988. print  file FILE.TXT on a printer attached to port PRN:.  For
  1989. point-and-click type FTP clients you have to specify that  it
  1990. should  ask  you  for the destination file name.  Then,  when
  1991. prompted  for the destination file name you enter  'PRN:'  or
  1992. another  port  of your choice. For example, for  the  popular
  1993. client  WS_FTP you have to check the 'Prompt for destinations
  1994. file  names'  option in the 'Session Options' section.  After
  1995. doing  that  you can simply upload the file-to-print  and  it
  1996. will  ask you for the destination, for which you fill in  the
  1997. printer port name.
  1998.  
  1999. The  above procedure should work well to print ASCII text and
  2000. text-based   protocols  like  PostScript  (If  your   printer
  2001. supports  it).  However, with binary files your  mileage  may
  2002. vary:  It seems that the port closes when a ^D is encountered
  2003. in the stream that is being printed.
  2004.  
  2005. 2.18 How to Execute Programs via FTP with Serv-U
  2006. ------------------------------------------------
  2007. Serv-U  allows you to start DOS or Windows programs  remotely
  2008. using a FTP client. Keep in mind though that Serv-U is not  a
  2009. Telnet  server,  and any program output or  windows  will  be
  2010. displayed  at  the PC where Serv-U is running.  However,  for
  2011. many  applications the ability to start a program is  enough,
  2012. or  you might be able to redirect input and output, i.e. like
  2013. 'MYPROG.EXE < INPUT.TXT > OUTPUT.TXT'.
  2014.  
  2015. The  first  requirement to using remote program execution  is
  2016. that  the  user needs sufficient access rights to  start  the
  2017. desired programs. This is controlled by the 'execute'  access
  2018. right  in the 'Setup Users/Groups' dialog box. You can either
  2019. give a user execute access to the directory where the program
  2020. can  be found, or you can specify the exact program name. For
  2021. example,  if  we  want  to  be able  to  execute  COMMAND.COM
  2022. remotely,  and  this  program can  be  found  in  the  C:\DOS
  2023. directory, then the following access rule would do the trick:
  2024.  
  2025.      C:\DOS\COMMAND.COM    - execute access
  2026.  
  2027. Now, to actually start a program remotely you need to use the
  2028. FTP  command  'SITE  EXEC' from the FTP client.  Usually  you
  2029. cannot  do that directly, since the client doesn't understand
  2030. this command, and you need to tell the client to send it as a
  2031. literal string to the server. for example the UNIX FTP client
  2032. (and  others like it, as the one that comes with  Windows  95
  2033. and  NT)  uses the 'QUOTE' command for this purpose.  So  the
  2034. full  command line to let COMMAND.COM copy a file from  A.TXT
  2035. to B.TXT would become:
  2036.  
  2037.      QUOTE SITE EXEC C:/DOS/COMMAND.COM COPY /B A.TXT B.TXT
  2038.  
  2039. You  might notice the use of '/' instead of '\' in the  path.
  2040. This  is  because most command line FTP clients do  not  take
  2041. kindly to backslashes. For Serv-U it doesn't  matter and  you
  2042. can  use  '/'  and '\' alike. You can also  see  that  it  is
  2043. possible  to  specify  arguments to a program  as  you  would
  2044. usually do, Serv-U passes them on to the program. The example
  2045. above will likely only work for command line FTP clients that
  2046. are  based  on  the  UNIX  client. For  point-and-click  type
  2047. clients, like WS_FTP you are on your own. They may or may not
  2048. have  the ability to send literal commands to the server  but
  2049. the way to get that done will vary from client to client.
  2050.  
  2051. Starting programs remotely may not be as straight forward  as
  2052. it  seems,  and  can  have varies side  effects.  Also,  some
  2053. programs  need  to  be  started via the command  interpreter,
  2054. COMMAND.COM,  others not. In short: Some  experimentation  is
  2055. recommended!
  2056.  
  2057. One  more  important thing about 'execute'  access:  Although
  2058. Serv-U checks the program's path for access, the program  you
  2059. start  this way is free to access and delete any file in  any
  2060. directory  on  your  computer! Also, if  you  give  'execute'
  2061. access to a directory then any program in the DOS path can be
  2062. started! In short: Be very careful with 'execute' access,  as
  2063. this is a very big potential security hole!
  2064.  
  2065. 2.19 How to Use Serv-U with 'SLIP/PPP Emulators'
  2066. ------------------------------------------------
  2067. More  and  more  Internet  Access Providers  these  days  are
  2068. offering Internet connections that are not 'real'. Instead of
  2069. having  their own IP address these connections run on top  of
  2070. the  IP  address of a UNIX host system. The general name  for
  2071. this  category of connections is 'SLIP/PPP emulators'  and  a
  2072. few of the popular programs that will do that are 'TIA' (=The
  2073. Internet  Adapter),  'TWinsock', and 'Pipeline'.  The  reason
  2074. ISP's use them is because they offer a cheap way to get  many
  2075. people  connected  to  the net. They usually  work  fine  for
  2076. programs  like Netscape, mail, and FTP clients. However,  for
  2077. servers they come with a number of build-in disadvantages.
  2078.  
  2079. Because  of  the way they have to do their work they  have  a
  2080. number  of  peculiarities. Since the PC has to share  the  IP
  2081. number with the host system you will generally not be able to
  2082. use  the default port 21 for Serv-U. Instead, you either have
  2083. to  use  a high port number (generally above 8000) or set  up
  2084. 'port  redirection'. Ask your Internet provider  for  details
  2085. about  the  latter. A related problem is that the  IP  number
  2086. displayed by Serv-U is, in this case, not the IP number  that
  2087. clients  should use to contact your server. It  is  merely  a
  2088. dummy  to  keep  the socket stack of the PC  happy.  For  the
  2089. outside  world the IP number of your server is  the  same  as
  2090. that  of the emulator host system, i.e. that of your Internet
  2091. provider. Another special effect is that clients will not  be
  2092. able  to  use 'passive' mode for data transfers.  This  means
  2093. that  regular FTP clients will work OK, but WWW browsers like
  2094. Netscape and Mosaic will not work when Serv-U runs via a SLIP
  2095. emulator.  For  the same reason it won't be possible  to  use
  2096. clients that are also connected via a SLIP emulator either.
  2097.  
  2098. Just  in  case you are interested I'll give you the technical
  2099. details  behind all this. Since Serv-U has to  share  the  IP
  2100. number  with the Internet connection host system  (Usually  a
  2101. UNIX system), the usual FTP port (number 21) will most likely
  2102. be  already in use by the host system. Because at a single IP
  2103. address there is only a single port 21 this means either Serv-
  2104. U  or  the host has to move to another port. The second  side
  2105. effect has to do with the socket stack: They usually need  to
  2106. know  their  own IP address to do the work, and to  keep  the
  2107. stack  happy  it is installed with a non-existent  IP  number
  2108. like  192.0.2.1  (Seems  to  be a popular  choice).  The  FTP
  2109. protocol  does  not use the server side IP number  much,  the
  2110. only  exception is the FTP 'PASV' command, which is used  for
  2111. passive mode data transfers (Which all WWW browsers use).  In
  2112. essence, what the PASV command does is ask the server for  an
  2113. IP  address and port number where it will listen for the data
  2114. connection.  Since  the FTP server does  not  know  that  its
  2115. address  is bogus, it will trustfully report this  back.  The
  2116. client will then try to connect to this dummy address,  which
  2117. of course will never work.
  2118.  
  2119. 2.20 How to use Netscape to access Serv-U
  2120. -----------------------------------------
  2121. You  might  not  be aware of it, but Netscape and  other  WWW
  2122. browsers  can  do  a whole lot more than just  anonymous  FTP
  2123. access. The general syntax for FTP is the following:
  2124.  
  2125.      FTP://<user>:<password>@<IP address>/<path/file>
  2126.  
  2127. Very  little of this is needed and in its simplest  form  you
  2128. only  use  the  <IP  address>  which  results  in  the  usual
  2129. anonymous  access. If you add a <user> section  (leaving  out
  2130. the password) then Netscape will prompt you for a password if
  2131. needed.  Of  course,  you can also specify  the  password  by
  2132. yourself by adding the <password> section. So far we did  not
  2133. use  the <path/file> section and this means the user will end
  2134. up  in his or her home directory. If you want to go somewhere
  2135. else  you  can tell Netscape to do this with the  <path/file>
  2136. section.
  2137.  
  2138. In the <path/file> section you should use '/' instead of '\',
  2139. and  you can add a drive letter as part of the path.  So,  to
  2140. finish up with an example that uses all of the above:
  2141.  
  2142.      FTP://john:secret@ftp.cat-soft.com/f:/john
  2143.  
  2144. This would log John into the Cat Soft server.
  2145.  
  2146. By  the  way, did you know that the version 2.0 or  later  of
  2147. Netscape  can also upload files to a FTP server?  To  do  so,
  2148. simply  drag  the file-to-upload from 'Explorer'  (the  Win95
  2149. file  manager), or from the 'File Manager' (in NT or  Windows
  2150. 3.1)  to the Netscape window and drop it there. Experiment  &
  2151. Enjoy!
  2152.  
  2153. 2.21  How to Let the Whole World into Your Server (and Delete
  2154.       All Your Files)
  2155. -------------------------------------------------------------
  2156. Even  for  those with a PC-oriented exhibitionist inclination
  2157. Serv-U  has  something to offer. You can let the whole  world
  2158. into your server and have them delete all your files. To  top
  2159. it off, if set up correctly they will reformat your hard disk
  2160. along the way too!
  2161.  
  2162. The  easiest  way to all that fun is to uncheck  the  'Enable
  2163. security'  checkbox in the 'Setup Server'  dialog  box.  This
  2164. utterly  and completely disables all security in  the  server
  2165. and  thus offers the most comfort to your FTP users. Not only
  2166. can they freely copy and delete each and every file, they can
  2167. also  use  the  unique Serv-U feature that  lets  them  start
  2168. programs  remotely.  Of course, the fun  is  over  once  they
  2169. remotely  start FORMAT.COM, but what the heck,  it  was  nice
  2170. while it lasted!
  2171.  
  2172. Now,  for those that are a bit 'sarcasm inhibited' I'll spell
  2173. it  out:  NEVER,  NEVER,  NEVER LEAVE THE  'ENABLE  SECURITY'
  2174. OPTION  SWITCHED  OFF  IF YOUR SERVER  IS  CONNECTED  TO  THE
  2175. INTERNET!!!  This might all seem a bit overkill, but  believe
  2176. it or not, I quite regularly get E-mail from people that tell
  2177. me  they are running Serv-U exactly like that on the Net. Now
  2178. don't tell me I didn't warn you.
  2179.  
  2180. 2.22 How to use multi-homed IP support
  2181. --------------------------------------
  2182. If  your  operating system supports it, and you have multiple
  2183. IP  addresses installed at your computer (Typically  this  is
  2184. done  in  NT),  you  can let Serv-U respond  differently  for
  2185. different IP addresses that the users connects to. To make it
  2186. a  little  clearer  a  small example: Say  you  have  two  IP
  2187. addresses   assigned   to   your   PC,   152.3.110.167    and
  2188. 152.3.110.168,  which  correspond  to  IP  names   "ftp1.cat-
  2189. soft.com" and "ftp2.cat-soft.com" respectively. Now you  want
  2190. anonymous  users logging into the "ftp1" IP address  to  have
  2191. access  to different files and directories from those logging
  2192. into "ftp2". This is called multi-homed IP, and supported  by
  2193. Serv-U.
  2194.  
  2195. The  first step to using this is in the 'Setup Server' dialog
  2196. box.  Press the button labeled 'IP Homes' in there. Then  use
  2197. the  screen that pops up to enter all the IP numbers of  your
  2198. PC.  When this is done you can go to the 'Setup Users' dialog
  2199. box,  which will now show a new selection list with all  your
  2200. IP  numbers.  Just set up the users as you  did  before,  and
  2201. select  the  appropriate IP number that should be  associated
  2202. with  that  user name.  This will allow you, for example,  to
  2203. make  several  users  named 'anonymous', each  responding  to
  2204. different  IP addresses. That's all there is to using  multi-
  2205. homed IP, it could not be easier!
  2206.  
  2207.  
  2208. 3. THE INNER WORKINGS
  2209. =====================
  2210.  
  2211. Before  I  go  on to describe the settings of the  SERV-U.INI
  2212. file  I  want to spend a few words describing how Serv-U  was
  2213. made and how it goes about its job.
  2214.  
  2215. 3.1 Serv-U Internals
  2216. --------------------
  2217. The  program was written using Borland C++ version 4.52  (for
  2218. the 16-bit version) and version 5.0 (for the 32-bit version).
  2219. To  check  for  shaky pointers and catch all  those  resource
  2220. leaks  the  program Bounds Checker version 3.01 from  Nu-Mega
  2221. was  used.  I think no serious Windows programmer  should  be
  2222. without the latter, very highly recommended!
  2223. This  whole project started a little over two years ago after
  2224. much  disappointment  with  the  existing  FTP  servers   for
  2225. WinSock.  In its current version it consists of  a  bit  over
  2226. 22000  lines  of C++ code, divided into 41 C++  classes.  The
  2227. whole  program  was constructed from scratch, not  using  any
  2228. existing  FTP server code, and is tailored to MS-Windows  and
  2229. WinSock.
  2230.  
  2231. Internally, everything is very much compartmentalized,  using
  2232. a  different class for different partial tasks.  There  is  a
  2233. WinSock  class library, providing hi-level access to  Windows
  2234. Sockets and hiding all the nasty parts of dealing with  them.
  2235. It   uses   100%   asynchronous  WinSock   functions   (which
  2236. unfortunately  do not always work correctly on  a  number  of
  2237. WinSock  stacks) thus avoiding problems with multiple  active
  2238. sockets  for  a  single task and re-entry. There  is  a  FTP-
  2239. manager  class,  taking care of listening  for  clients,  and
  2240. setting  up  instances of the FTP-command  interpreter  class
  2241. when  this happens. The latter does the actual interpretation
  2242. of  the  FTP  commands,  talking to the  security  class  for
  2243. clearance  and  the  WinSock class for  communications.  Then
  2244. there are some utility-like classes, like those dealing  with
  2245. setup  and  logging.  By having all these  compartments  that
  2246. handle  very well defined tasks, I hope to be able to  easily
  2247. extend  this  FTP  server  and  fix  those  (hopefully   few)
  2248. remaining bugs quickly!
  2249.  
  2250. The  32-bit version of Serv-U is not multi-threaded, a single
  2251. thread  is used for all clients. 'Multi-threading' is one  of
  2252. those  buzz  words  that are poorly understood  by  most  and
  2253. abused  by  many. 'Threads' are light-weight processes,  that
  2254. can  be used to run concurrent tasks without all the overhead
  2255. of  creating real processes. In the mainframe world this  has
  2256. traditionally been used for servers: Each client would  start
  2257. a separate process or thread. However, unless you are running
  2258. NT  on a multi-processor machine (and I wager that now we are
  2259. talking  about  much  less than 1% of all NT  installations),
  2260. multi-threading is not generally going to gain  you  anything
  2261. because thread maintenance and switching brings overhead with
  2262. it.  There are still good reasons for using multiple  threads
  2263. on  a  single  processor machine: For independent  background
  2264. tasks, like a printer spooler, it makes perfect sense.  Also,
  2265. if  a process needs to perform multiple concurrent tasks that
  2266. each  would  take a long time (and 'long' in  computer  terms
  2267. could  mean anything over a few tens of milliseconds),  using
  2268. multi-threading is a good practice. However, for servers  the
  2269. practice  of  starting a separate thread for each  client  is
  2270. usually to provide an easy way out of programming the  thing.
  2271. That way the programmer can use 'blocking' sockets and simply
  2272. block  (i.e.  'do nothing') until something  happens  on  the
  2273. socket stack. Makes for much simpler programs and is used for
  2274. all  the UNIX servers, so anything ported from there will  be
  2275. coded in this fashion. The better way to do things in Windows
  2276. is  to  make  the program event-driven and let it respond  to
  2277. messages from the socket stack instead of blocking the  task.
  2278. This  means 'asynchronous' sockets have to be used,  and  the
  2279. whole  program is much harder to make: Instead  of  a  single
  2280. easy  to  follow  flow the program now becomes  a  number  of
  2281. message  handler routines that can be called  in  any  order.
  2282. Serv-U  only  uses asynchronous sockets, and the response  to
  2283. each  socket stack message normally does not take much  time.
  2284. Thus,  a  single thread can handle this perfectly  well,  and
  2285. cutting  it  up  in multiple threads would only  slow  things
  2286. down.
  2287.  
  2288. 3.2 The SERV-U.INI File
  2289. -----------------------
  2290. All the settings for the server, users, and groups are stored
  2291. in  a  single file in text format. This file is always  named
  2292. SERV-U.INI.  When the program is started it  looks  for  this
  2293. file  in  a  number of different places: First the  directory
  2294. with  SERV-U.EXE  is checked. If no .INI  file  is  found  an
  2295. environment  variable  SERV-U is checked.  If  this  variable
  2296. exists  it  should  be  set to the path where  SERV-U.INI  is
  2297. found.  Finally, if this variable does not exist,  the  whole
  2298. DOS  path is scanned, including the Windows directories.  The
  2299. first SERV-U.INI file found on the way is used. If after  all
  2300. the  above  no  .INI file has been found,  the  program  will
  2301. create  one in the directory of  the Serv-U program.  Use  of
  2302. the  SERV-U  environment variable and the DOS path  makes  it
  2303. easy  to  set things up for network users where  there  is  a
  2304. single copy of the program but all the users needs their  own
  2305. settings. Serv-U uses the Windows built-in functions to  read
  2306. and  write  from/to the .INI file. A consequence of  this  is
  2307. that  the total size of SERV-U.INI can never exceed 64 Kbytes
  2308. on  Windows 3.1, 3.11 and Win95, limiting the number of users
  2309. that  can be set up. On NT there seems to be no limit to  the
  2310. .INI file.
  2311.  
  2312. We'll  now  go  over all the items that can appear  in  SERV-
  2313. U.INI. I will show you an invented setup file:
  2314.  
  2315.      [GLOBAL]
  2316.      Security=TRUE
  2317.      PortNr=21
  2318.      MaxNrUsers=15
  2319.      MaxNrAnonymous=10
  2320.      Invisible=TRUE
  2321.      Logfile=c:\serv-u\logfile.txt
  2322.      Logging=YES
  2323.      TimeoutUser=600
  2324.      TimeoutAnonymous=15
  2325.      TryOut=Crippled
  2326.      LogGETs=ON
  2327.      LogPUTs=ON
  2328.      LogSystemMes=ON
  2329.      LogSecurityMes=ON
  2330.      LogFTPCommands=OFF
  2331.      LogFTPReplies=OFF
  2332.      LogIPNames=ON
  2333.      RegistrationKey=S%FgdfsdEvG,Rob Beckers,Cat Soft,1
  2334.      Window=100,100,400,300
  2335.      UserInfoWin=409,300
  2336.      DirChangeMesFile=index.txt
  2337.      DirChangeMesFile2=c:\serv-u\index.txt
  2338.      LinkFile=link.txt
  2339.      LinkFile2=c:\serv-u\link.txt
  2340.      CheckAnonPass=OFF
  2341.      Version=2.0.3.11
  2342.      StartIconic=No
  2343.      
  2344.      [SIGNONOFF]
  2345.      SignOn1="Welcome to Robby's FTP-Server!"
  2346.      SignOn2="It is %time on %date and you are user no. %unow"
  2347.      SignOff1="Thanks for logging in!"
  2348.      SignOff2="Hope to see you again soon . . ."
  2349.      
  2350.      [IP-ACCESS]
  2351.      DenyRulesFirst=YES
  2352.      Bounce1=132.68.175.201
  2353.      Bounce2=223.*.*.*
  2354.      Allow1=132.68.176.53
  2355.      Allow2=132.68.175.*
  2356.      Allow3=101.43.23.30-40
  2357.      
  2358.      [USER=Anonymous@2]
  2359.      HomeDir=d:\anonftp2
  2360.      Access1=d:\anonftp2\upload,WP
  2361.      Access2=d:\anonftp2,RLP
  2362.      LoginMesFile=logmes.txt
  2363.      HideHidden=YES
  2364.      RelPaths=YES
  2365.      RatiosEnable=YES
  2366.      Ratios=BytesPerSession
  2367.      RatioUp=1
  2368.      RatioDown=7
  2369.      RatiosCredit=19968.000000
  2370.      
  2371.      [USER=Anonymous@1]
  2372.      HomeDir=d:\anonftp1
  2373.      Access1=d:\anonftp1\upload,WP
  2374.      Access2=d:\anonftp1,RLP
  2375.      LoginMesFile=logmes.txt
  2376.      
  2377.      [USER=Rob]
  2378.      Group=system
  2379.      Password=WdRx.Jlk0kemm%
  2380.      HomeDir=c:\
  2381.      AlwaysAllowLogin=YES
  2382.      QuotaEnable=YES
  2383.      QuotaMaxCurrent=10240000,89739
  2384.      Access1=\,RWMCDLPE
  2385.      Access2=lpt1:,WM
  2386.      Access3=prn:,WM
  2387.      Access4=aux:,WM
  2388.      Access5=lpt2:,WM
  2389.      Access6=lpt3:,WM
  2390.      Access7=lpt4:,WM
  2391.      Access8=com1:,RWM
  2392.      Access9=com2:,RWM
  2393.      Enable=YES
  2394.      
  2395.      [USER=ALL]
  2396.      HomeDir=y:\
  2397.      Access1=y:\,RL
  2398.      Enable=NO
  2399.      
  2400.      [GROUP=SYSTEM]
  2401.      Access1=c:\system,RWDCMLEP
  2402.      Access2=d:\,RWDCMLEP
  2403.      Access3=y:\novell,RWDLP
  2404.      
  2405.      [RATIOS]
  2406.      Free1=*.txt
  2407.      Free2=\*\*.bat
  2408.      Free3=d:\gifs\sample.gif
  2409.      
  2410.      [IP-HOMES]
  2411.      IP1=152.3.110.168
  2412.      IP2=152.3.110.169
  2413.      
  2414.      [EXTERNAL]
  2415.      ClientCheckDLL1=CHKNOVELL.DLL
  2416.      ClientCheckDLL2=CHKNT.DLL
  2417.      
  2418.      
  2419. All  but  five  of  these settings can  be  changed  and  set
  2420. interactively  through the 'Setup' menus. The exceptions  are
  2421. the  entries  for  'Invisible', 'RegistrationKey',  'Window',
  2422. 'UserInfoWin', and 'StartIconic', and if you really desire  a
  2423. user  to have no password, that user's 'Password=' entry  has
  2424. to  be  set  manually (i.e. nothing after  the  '='  sign  to
  2425. indicate 'no password').
  2426.  
  2427. The following paragraphs will describe each section and entry
  2428. in more detail.
  2429.  
  2430. [GLOBAL]
  2431. All  the settings related to the Serv-U program itself,  i.e.
  2432. the  functioning of the FTP server and system functions,  are
  2433. found  in  the  '[Global]' section. For the file  formats  of
  2434. directory change message files and  link files please see the
  2435. appropriate 'How to .' section.
  2436.  
  2437. If  security should not be enforced, the 'Security' entry can
  2438. be set to FALSE or 0. Doing so will leave the FTP server wide
  2439. open to everybody!!! Default value for 'Security' is TRUE.
  2440.  
  2441. The  'PortNr'  entry determines the IP port that  the  server
  2442. will listen on. Default value is 21.
  2443.  
  2444. To  limit  the  maximum  number  of  simultaneous  users  the
  2445. 'MaxNrUsers'  entry should be set to the desired  number.  No
  2446. entry  or  a negative number results in no maximum, only  the
  2447. number of available sockets will limit the number of users in
  2448. that  case. Similarly, the 'MaxNrAnonymous' entry limits  the
  2449. maximum  number of 'Anonymous' users. The value put  here  is
  2450. only   meaningful  if  it  is  smaller  than  that   of   the
  2451. 'MaxNrUsers' entry.
  2452.  
  2453. For  system  managers  that don't want their  users  to  mess
  2454. around with the server settings, it is possible to make Serv-
  2455. U  invisible by setting the 'Invisible' entry to TRUE, or YES
  2456. and  put the Serv-U program in the 'startup' group. When this
  2457. is done the server will not show up in the task manager list.
  2458. One  consequence is that there is no way to stop the  program
  2459. short of exiting Windows. Default is NO for this entry.
  2460.  
  2461. The 'LogFile' entry should specify a full path and name for a
  2462. logfile  if logging is desired. There is no default  logfile.
  2463. To actually switch logging on and off the 'Logging' entry can
  2464. be  set to ON or TRUE, or OFF or FALSE. Switching logging  ON
  2465. will  only  work  if  a  logfile  is  specified.  By  default
  2466. 'Logging' is set to ON.
  2467.  
  2468. The  entries 'TimeOutUser' and 'TimeOutAnonymous'  specify  a
  2469. time-out  in  minutes  for  respectively  regular  users  and
  2470. anonymous  users. If a FTP connection is left  idle  for  the
  2471. indicated amount of time it is automatically closed.  Filling
  2472. in  0  results in no time-out. Default values are 15  minutes
  2473. for anonymous and 10 hours for regular users.
  2474.  
  2475. The  next one deals with the way the program can be tried out
  2476. (when  there  is  no  registration  code).  'TryOut'  can  be
  2477. 'Crippled' or 'Full'. The first allows a user to do a maximum
  2478. of  5  GETs and 5 PUTs per session, switches the server  off-
  2479. line after 1 hour, and notifies clients that they are looking
  2480. at  an  unregistered try-out version. However,  it  does  not
  2481. contact my permission server. The 'Full' option gives you  no
  2482. limitations while trying the program, it is exactly equal  to
  2483. the  registered version. The downside is that it does  access
  2484. my  permission server to ask for permission to run each  time
  2485. Serv-U  is  started. This is how the 30 days of  try-out  are
  2486. enforced.
  2487.  
  2488. All  the 'LogXXXX' entries switch logging options on or  off.
  2489. Their names say it all, so I'll let you figure them out.
  2490.  
  2491. The   'RegistrationKey'  entry  is  used  for  entering   the
  2492. registration  code. You get this code after registration.  By
  2493. default it has no value and for evaluation of the program  it
  2494. should be left blank or out of the .INI file.
  2495.  
  2496. The  next  entry is 'Window' and this is set by Serv-U  every
  2497. time  the  program is stopped. It contains the last  position
  2498. and   size   of   the   program   window,   in   the   format
  2499. 'top,left,width,height'. Likewise,  'UserInfoWin'  saves  the
  2500. window position of the user information window, in the format
  2501. 'top,left'.
  2502.  
  2503. Related  to this is 'StartIconic' which stores if the program
  2504. should  start  as an icon. This happens when the  server  was
  2505. stopped while being iconized.
  2506.  
  2507. To  enable  directory change messages you  have  to  set  the
  2508. 'DirChangeMesFile' entry to a valid file name. This can be  a
  2509. complete  path  name, in which case the  same  file  will  be
  2510. displayed  for  all path changes, or it can be  a  file  name
  2511. only, which means Serv-U will look for that file in the  path
  2512. the  user  is  changing to. Likewise, 'DirChangeMesFile2'  is
  2513. used  in case the file specified in 'DirChangeMesFile' cannot
  2514. be found.
  2515.  
  2516. If  links  should be available and displayed  in  the  user's
  2517. directory listings then 'LinkFile' should be
  2518. set to the file name to use. The file name format is the same
  2519. as for 'DirChangeMesFile'. In case 'LinkFile' cannot be found
  2520. the server looks for 'LinkFile2'.
  2521.  
  2522. To  check if anonymous 'passwords' resemble an E-mail address
  2523. you can set 'CheckAnonPass' to YES, ON or TRUE. Likewise, you
  2524. can  switch checks off by setting it to FALSE, NO or OFF, and
  2525. this  is  also  the default. In that case Serv-U  will  allow
  2526. anything as an anonymous password.
  2527.  
  2528. Finally, 'Version' keeps track of the Serv-U version  number.
  2529. Format is 'major,minor,revision,build no.' and it is used for
  2530. automatic .ini file conversion.
  2531.  
  2532. [SIGNONOFF]
  2533. This section contains the messages that are displayed after a
  2534. user  contacts the FTP server and just before he disconnects.
  2535. Every  line  has a separate entry with a number at  the  end,
  2536. denoting  the order. The sign-on message is put in 'SignOnxx'
  2537. entries  (with xx the line number), and the sign-off  message
  2538. is put in 'SignOffxx'.
  2539.  
  2540. There  are  several special character combinations recognized
  2541. by Serv-U and they are expanded to their actual values when a
  2542. user logs on or off. They all begin with '%' and you can find
  2543. a  complete  list in the 'How to use sign-on and/or  sign-off
  2544. messages' section.
  2545.  
  2546. A tip: Keep the number of lines and the their length limited.
  2547. Most  FTP clients will mess up lines over 80 characters,  and
  2548. since  a  FTP reply code is tagged to the beginning of  these
  2549. lines  before they are sent, it is wise to keep them to  less
  2550. then 75 characters.
  2551.  
  2552. [IP-ACCESS]
  2553. This  section  determines  which client  IP-numbers  will  be
  2554. allowed access to Serv-U. There are two kinds of rules: Those
  2555. that refuse access in the form of 'Bounce' entries, and those
  2556. that  grant  access using 'Allow' entries.  If  this  section
  2557. doesn't exist, or no entries are found, then all clients  are
  2558. allowed  to contact the server. The reverse is also true,  if
  2559. there is even a single entry ('Bounce' or 'Allow') then  only
  2560. those clients will be allowed to contact the server that pass
  2561. the  rule.  All entries are numbered sequentially  ('Allow1',
  2562. 'Allow2'  etc.)  and  they are evaluated according  to  their
  2563. number from first to last. Numbers should be consecutive. The
  2564. 'Bounce' rules are evaluated before the 'Allow' rules.
  2565.  
  2566. The IP-number of the client is matched section by section  to
  2567. each rule until a match is found. If the matching rule is one
  2568. of  the 'Bounce' rules, the client is disconnected. If the IP
  2569. number matches an 'Allow' rule then he can proceed. The rules
  2570. can be exact IP-numbers, or contain special characters. There
  2571. are two of those:
  2572.  
  2573.      *    = wildcard, match any number
  2574.      -    = denotes a range
  2575.  
  2576. A  quick example: The rule '132.*.76.48-89' will allow  entry
  2577. to  clients with an IP-address starting with 132, the  second
  2578. section  can be anything (0..255), the third must be  76  and
  2579. the  last  section  should  be  between  48  and  89  (limits
  2580. included).
  2581.  
  2582. The  'DenyRulesFirst' flag is used to specify in which  order
  2583. the  access rules should be evaluated: The 'deny' rules first
  2584. and  then the 'bounce' rules, or vice versa. Default this  is
  2585. set to YES.
  2586.  
  2587. [USER='Name']
  2588. The  information  about  a user is stored  in  this  section,
  2589. 'Name'  stands for the user's name. Each user has a  separate
  2590. section.  It  contains information needed to  authenticate  a
  2591. user  during login, and rules determining what this  user  is
  2592. allowed  to access. The Serv-U program will first check  this
  2593. section  for a regular user. If no applicable information  is
  2594. found  and  the  user is a member of a group,  the  group  is
  2595. addressed for the same information. If the result of this  is
  2596. still undetermined, the special user name 'ALL' is searched.
  2597.  
  2598. Now  to  the  entries that can be found in this section.  The
  2599. identity  of  a  user is verified by comparing his  password,
  2600. after  encryption, with the one in the 'Password' entry.  The
  2601. UNIX  'crypt()' command is used to encode the passwords. This
  2602. makes  it possible to extract users with their password  from
  2603. the  PASSWD file of a UNIX system, the same passwords  should
  2604. work  on  both systems. Unfortunately, there is not a  single
  2605. standard for password encryption on UNIX systems these  days.
  2606. Serv-U  uses the most common scheme, but this might not  work
  2607. for your system.
  2608.  
  2609. If  the  password matches, the home directory of the user  is
  2610. taken from the 'HomeDir' entry. This should always be a  full
  2611. path name, including drive letter!
  2612.  
  2613. To make a user a member of a certain group, the 'Group' entry
  2614. can  be  used.  All information needed and not found  in  the
  2615. user's section; password, home dir and file/directory access,
  2616. are then  looked for in the group's section.
  2617.  
  2618. Information  about file and directory access for  a  user  is
  2619. stored  in  the 'Access' entries. Each of these is  numbered,
  2620. and  access information is checked in order: first  comparing
  2621. it  to  the  first rule, then the second, etc. The  numbering
  2622. must  be consecutive. Access rules start with a path or  file
  2623. name.  These  paths are usually full names,  including  drive
  2624. letter.  If  the drive letter is missing, they apply  to  all
  2625. drives.  If different settings are needed for a subdirectory,
  2626. then  a  rule  with that directory should appear  before  its
  2627. parent,  i.e. with a lesser number (As a consequence  of  the
  2628. order in which Serv-U evaluates access rules). The path in an
  2629. access rule is followed by a comma and the access information
  2630. itself.  This  can be a combination of up to eight  different
  2631. characters:
  2632.  
  2633.      R    = read access to files
  2634.      W    = write access to files
  2635.      M    = modify access to files (implies write access)
  2636.      E    = execute access, for remotely starting programs
  2637.      C    = right to create subdirectories
  2638.      D    = right to delete subdirectories
  2639.      L    = directory list access
  2640.      P    = the rule 'propagates' to sub directories as well
  2641.  
  2642. It  is entirely possible to have no access information at all
  2643. (only  a  path). This means that the user will not  have  any
  2644. access  to  that  path. One thing to realize  is  that  write
  2645. access  to a file does not imply read access! As you can  see
  2646. it is also possible to specify access rights for the parallel
  2647. and  serial  ports.  They are part of  the  regular  security
  2648. scheme  and to transfer to or from a port a user needs access
  2649. rights.  Then  finally, the path in an access rule  does  not
  2650. have  to point to a directory. It is also possible to specify
  2651. a filename. Of course, the 'C', 'D', 'L', and 'P' rights will
  2652. not have any meaning then.
  2653.  
  2654. There  are two special user names: 'Anonymous' and 'ALL'.  If
  2655. there is an user 'Anonymous', it will be possible to log into
  2656. the  server without a password. Instead, Serv-U will ask  for
  2657. the  user's E-mail address and log this. Most of the  regular
  2658. entries apply for 'Anonymous' as well, except 'Password'  and
  2659. 'Group', these are ignored. In fact, for anonymous users  the
  2660. sections for groups and 'ALL' are never searched.
  2661.  
  2662. The user 'ALL' is searched if no appropriate rule is found in
  2663. a  user's or the user's group's entry. It can contain any  of
  2664. the regular entries.
  2665.  
  2666. The  user account can be disabled by setting 'Enable' to  NO.
  2667. By default accounts are enabled.
  2668.  
  2669. 'RelPaths'  determines if users should be  treated  with  all
  2670. path  names  relative  to  their  home  directory.  This   is
  2671. desirable  for  use with WWW browsers that insist  on  having
  2672. access  to the root directory ('/'). Switching this on limits
  2673. users  to  the sub-tree of their home directory, they  cannot
  2674. switch to other drives. If you switch it off then users  will
  2675. see their full path. Default is switched off.
  2676.  
  2677. The  'LoginMesFile'  entry is used for pointing  to  a  login
  2678. message file that should be displayed to the user upon login.
  2679. The  same file name rules apply as for the 'DirChangeMesFile'
  2680. entry,  and you can find more details about its usage in  the
  2681. 'How to setup user specific long messages' section.
  2682.  
  2683. The  user  heading  can contain an added '@'  followed  by  a
  2684. number,  like '[USER=Anonymous1@1]'. This indicates that  the
  2685. user name is associated with a particular IP number for multi-
  2686. homed IP support. A list with IP numbers and their index  can
  2687. be found in the '[IP-HOMES]' section.
  2688.  
  2689. In  case  'HideHidden' is YES or TRUE all the files with  the
  2690. 'hidden'  attribute  will not show up in directory  listings.
  2691. Default  this is NO. In case a user should always be  allowed
  2692. to  log  in,  even  when  the  user  limit  is  reached,  the
  2693. 'AlwaysAllowLogin' setting should be TRUE or YES. Default for
  2694. this is NO.
  2695.  
  2696. The  UL/DL  ratio settings are also part of  the  user  setup
  2697. info.   To   enable  the  use  of  ratios  for  a  user   the
  2698. 'RatioEnable' setting should be set. The type of ratios Serv-
  2699. U  will  use is controlled by 'Ratios': The four options  are
  2700. 'FilesPerSession'  which  counts  files  for  each   session,
  2701. 'BytesPerSession'  which  counts  bytes  for  each   session,
  2702. 'FilesOverall'  to  count  files  over  all   sessions,   and
  2703. 'BytesOverall' which is for counting bytes over all sessions.
  2704. The  'RatioUp'  setting  specifies the  upload  part  of  the
  2705. upload/download equation, and 'RatioDown' is for the download
  2706. part.  The  credit is stored in 'RatiosCredit', depending  on
  2707. the  type  of ratios used this can be in 'files' or  'bytes',
  2708. and  it can be a preset value for each session or the current
  2709. credit in case ratios are counted over all sessions.
  2710.  
  2711. In  case the user's disk usage should be limited, disk  quota
  2712. limitations can be switched on by enabling 'QuotaEnable'. The
  2713. 'QuotaMaxCurrent'  value  keeps  track  of  the  maximum  and
  2714. current disk usage values in bytes.
  2715.  
  2716. [GROUP='Name']
  2717. These  sections contain the group info. The entries here  are
  2718. exactly the same as those for a user, except that the 'Group'
  2719. entry has no meaning of course.
  2720.  
  2721. [IP-HOMES]
  2722. This section lists all the IP numbers that Serv-U should  use
  2723. for multi-homed IP support. Each line couples an index number
  2724. with    a    corresponding   IP   number    of    the    form
  2725. 'IPx=yyy.yyy.yyy.yyy'. In this 'x' is the index  number  (any
  2726. positive  number between 1 and 30000), and 'yyy.' is  the  IP
  2727. number that should be associated with it.
  2728.  
  2729. When  a user name should be coupled to a particular IP  home,
  2730. the  index  number for that IP home is appended to  the  user
  2731. name, preceded by a '@' character.
  2732.  
  2733. [RATIOS]
  2734. This is an auxiliary section for the use of UL/DL ratios.  It
  2735. allows  for  specifying a list of files which should  not  be
  2736. counted  by  the ratio system. Each line starts  with  'Free'
  2737. followed  by a sequential number. The information  after  the
  2738. equal  sign  is  the  path  or  file  name  that  should   be
  2739. discounted.
  2740.  
  2741. [EXTERNAL]
  2742. This  heading denotes a list of dynamic link libraries  which
  2743. Serv-U  should  use to very user access. In case  the  Serv-U
  2744. user  database does not provide an answer to access  requests
  2745. the  inquiry  is passed on to the first DLL in the  list,  if
  2746. this  DLL  does not have an answer it is send to  the  second
  2747. DLL, and so on.
  2748.  
  2749. Each   line  in  this  section  has  entries  of   the   form
  2750. 'ClientCheckDLL'. These are followed by an order  number  and
  2751. specify the file name of the DLL to use. The DLL file  should
  2752. be  either in the Serv-U program directory, somewhere in  the
  2753. DOS path, or in the Windows directory for Serv-U to find it.
  2754.  
  2755. 3.3 Using External User Access Verification DLLs
  2756. ------------------------------------------------
  2757. Serv-U  can  use an external DLL to verify client access  and
  2758. retrieve information like a client's home directory  etc.  If
  2759. one  of  more  external DLLs are specified and Serv-U  cannot
  2760. find  the appropriate information internally it will question
  2761. each  of  the  external DLL's in turn. This can  be  used  to
  2762. create  an  interface to external user databases,  which  can
  2763. then  control FTP access. If the appropriate DLL exists,  for
  2764. example  the NT build-in user database could be  used,  or  a
  2765. Novell user database.
  2766.  
  2767. Setup
  2768. -----
  2769. To   make   Serv-U  use  external  DLLs  for  client   access
  2770. verification you need to add the DLL names to the  SERV-U.INI
  2771. file. At the moment there is no interactive user setup to  do
  2772. this, so the ini file has to be edited directly. There can be
  2773. more  than  one DLL, and Serv-U will query them in the  order
  2774. specified  until  one of the DLLs signals  that  it  had  the
  2775. required information.
  2776.  
  2777. The   DLL  names  need  to  be  added  to  a  section   named
  2778. '[EXTERNAL]'. The format is as follows (for example):
  2779.  
  2780.      [EXTERNAL]
  2781.      ClientCheckDLL1=CHKNOVELL.DLL
  2782.      ClientCheckDLL2=CHKNT.DLL
  2783.             .
  2784.             .
  2785.  
  2786. The  file names can be either full path names, or file  names
  2787. only.  If  the full path is specified then Serv-U  will  only
  2788. look at that path. If only the file name is given Serv-U will
  2789. first  look  in  the  program  directory,  then  the  current
  2790. directory,  the  entire  PATH, and  finally  in  the  Windows
  2791. directories.
  2792.  
  2793. DLL Specifications
  2794. ------------------
  2795. The  DLL  entry  point for Serv-U needs to be  the  following
  2796. function:
  2797.  
  2798.      int HandleClientEvent(RClientEventStr* pEventStruc)
  2799.  
  2800. Please note that the function name is case sensitive!
  2801. The  function should return TRUE (=1) if it handled the event
  2802. and  does  not  want it to be passed on to the next  DLL.  It
  2803. should return FALSE (=0) in case it didn't handle the event.
  2804.  
  2805. The RClientEventStr structure is defined as follows:
  2806.  
  2807.      struct RClientEventStr {
  2808.        int Event;        // event code
  2809.        int  Flag;        // flag, meaning depends on event
  2810.        char User[40];    // user name
  2811.        char Aux[512];    //  auxiliary  area, usage depends on event
  2812.        char HostIP[16];  // server IP home
  2813.      }
  2814.  
  2815. The 'Event' code determines the nature of the request and can
  2816. have the following values:
  2817.  
  2818.      #define SRVU_LoginMesFile     1    // get login message file
  2819.      #define SRVU_HomeDir          2    // get home dir
  2820.      #define SRVU_Password         3    // verify password
  2821.      #define SRVU_IPAccess         4    // verify IP access
  2822.      #define SRVU_WriteFile        5    // verify write access
  2823.      #define SRVU_ReadFile         6    // verify read access
  2824.      #define SRVU_ModifyFile       7    // verify  mod./del. file access
  2825.      #define SRVU_ExecProg         8    // verify execute access
  2826.      #define SRVU_ListDir          9    // verify dir listing access
  2827.      #define SRVU_ChangeDir        10   // verify dir change access
  2828.      #define SRVU_DeleteDir        11   // verify dir delete access
  2829.      #define SRVU_CreateDir        12   // verify dir create access
  2830.      #define SRVU_HideHidden       13   // get setting for 'hide hidden files'
  2831.      #define SRVU_RelPaths         14   // get setting for 'relative paths'
  2832.      #define SRVU_RatioType        15   // get setting for type of ratios
  2833.      #define SRVU_RatioDown        16   // get setting for download ratio
  2834.      #define SRVU_RatioUp          17   // get setting for upload ratio
  2835.      #define SRVU_RatioCredit      18   // get/ajust ratio credit setting
  2836.      #define SRVU_RatioFree        19   // verify if file is free for ratios
  2837.      #define SRVU_QuotaEnable      20   // verify if disk quota is enabled
  2838.      #define SRVU_QuotaChange      21   // change in disk quota
  2839.      #define SRVU_QuotaMax         22   // maximum disk quota
  2840.      #define SRVU_AlwaysLogin      23   // allways allow login
  2841.  
  2842.  
  2843. Event Details
  2844. -------------
  2845. SRVU_LoginMesFile
  2846.        On entry:        User = user name
  2847.        On return:    Flag = TRUE (=1) if file name was found, FALSE (=0)
  2848.                    otherwise
  2849.              Aux = file name of login message file, if one was found
  2850.  
  2851. SRVU_HomeDir
  2852.        On entry:    User = user name
  2853.        On return:    Flag = TRUE if home dir was found, FALSE otherwise
  2854.              Aux = home dir (full path), if one was found
  2855.  
  2856.        Note:        In case a user account is disabled 'no home dir' should
  2857.             be returned.
  2858.  
  2859. SRVU_Password
  2860.        On entry:    User = user name
  2861.              Aux = password the user entered
  2862.        On return:    Flag = TRUE if password was correct, FALSE otherwise
  2863.  
  2864. SRVU_IPAccess
  2865.        On entry:    User = user name if available
  2866.              Aux = IP address of client, in text format
  2867.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2868.  
  2869.        Note:        If no user name is present it means the client just
  2870.             connected and a check should be made for server-wide
  2871.             IP access. If a user name is present access should be
  2872.             checked for that particular user only.
  2873.  
  2874. SRVU_WriteFile
  2875.        On entry:    User = user name
  2876.              Aux = full path of file
  2877.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2878.  
  2879. SRVU_ReadFile
  2880.        On entry:    User = user name
  2881.              Aux = full path of file
  2882.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2883.  
  2884. SRVU_ModifyFile
  2885.        On entry:    User = user name
  2886.              Aux = full path of file
  2887.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2888.  
  2889. SRVU_ExecProg
  2890.        On entry:    User = user name
  2891.              Aux = full path of program name to be executed
  2892.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2893.  
  2894. SRVU_ListDir
  2895.        On entry:    User = user name
  2896.              Aux = full path of directory
  2897.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2898.  
  2899. SRVU_ChangeDir
  2900.        On entry:    User = user name
  2901.              Aux = full path of directory
  2902.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2903.  
  2904. SRVU_DeleteDir
  2905.        On entry:    User = user name
  2906.              Aux = full path of directory
  2907.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2908.  
  2909. SRVU_CreateDir
  2910.        On entry:    User = user name
  2911.              Aux = full path of directory
  2912.        On return:    Flag = TRUE if access is allowed, FALSE otherwise
  2913.  
  2914. SRVU_HideHidden
  2915.        On entry:    User = user name
  2916.  
  2917.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2918.                     Aux = Aux[0]=1 if server should hide 'hidden' files
  2919.                                Aux[0]=0 if server should show 'hidden' files
  2920.  
  2921. SRVU_RelPaths
  2922.        On entry:    User = user name
  2923.  
  2924.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2925.                     Aux = Aux[0]=1 if server should use 'relative paths'
  2926.                                Aux[0]=0 for using full path names
  2927.  
  2928. SRVU_RatioType
  2929.        On entry:    User = user name
  2930.  
  2931.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2932.                    if U/D ratios should be disabled FALSE is also returned
  2933.                     Aux = set to the textual ratio type, as used in the INI file ie.
  2934.                                         "FilesPerSession" = count files for each session
  2935.                                           "BytesPerSession" = count bytes for each session
  2936.                                         "BytesOverall"    = count bytes over all sessions
  2937.                                         "FilesOverall"    = count files over all sessions
  2938.  
  2939. SRVU_RatioDown
  2940.        On entry:    User = user name
  2941.  
  2942.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2943.              Aux = set to the textual representation of the download ratio
  2944.                                (an unsigned 32-bit number)
  2945.  
  2946. SRVU_RatioUp
  2947.        On entry:    User = user name
  2948.  
  2949.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2950.              Aux = set to the textual representation of the upload ratio
  2951.                                (an unsigned 32-bit number)
  2952.  
  2953. SRVU_RatioCredit
  2954.        On entry:    User = user name
  2955.                     Aux = set to the textual representation of the value to add
  2956.                                to the credit (a floating point number, can be negative)
  2957.                                set to "0" if the request is to obtain the current value
  2958.  
  2959.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2960.              Aux = set to the textual representation of the (new) credit
  2961.                                value (a floating point number which can be negative)
  2962.  
  2963.        Note: All 'credit' calculations should be done with sufficient precision. In C
  2964.              a double is recommended.
  2965.  
  2966. SRVU_RatioFree
  2967.        On entry:    User = user name
  2968.                     Aux = set to the path/file name of the file to check if
  2969.                                it should be downloadable for free
  2970.  
  2971.        On return:    Flag = TRUE if file is free, otherwise FALSE
  2972.  
  2973. SRVU_QuotaEnable
  2974.        On entry:    User = user name
  2975.  
  2976.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2977.                     Aux = Aux[0]=1 if disk quota limitations are enabled
  2978.                                Aux[0]=0 if no disk quota limitations
  2979.  
  2980. SRVU_QuotaChange
  2981.        On entry:    User = user name
  2982.                     Aux = set to the textual representation of the value to change
  2983.                                the current quota with (can be negative, decreasing available
  2984.                                quota)
  2985.                                set to "0" if the request is to obtain the current value
  2986.  
  2987.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2988.              Aux = set to the textual representation of the (new) credit
  2989.                                value (a number which should always be positive).
  2990.  
  2991. SRVU_QuotaMax
  2992.        On entry:    User = user name
  2993.  
  2994.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  2995.              Aux = set to the textual representation of the maximum
  2996.                                disk quota amount.
  2997.  
  2998. SRVU_AlwaysLogin
  2999.        On entry:    User = user name
  3000.  
  3001.        On return:    Flag = TRUE if request was handled by DLL, FALSE otherwise
  3002.                     Aux = Aux[0]=1 if user should always be allowed to log in
  3003.                                Aux[0]=0 if user should bounce if max. no. of users
  3004.                                         is reached
  3005.  
  3006.  
  3007. 4. GETTING IN TOUCH - BUGS & REGISTRATION
  3008. =========================================
  3009.  
  3010. If  you  have questions or want to offer suggestions you  are
  3011. most  welcome  to drop me a line. However, please  check  out
  3012. this  manual and the Cat Soft Web site first to  see  if  the
  3013. answer to your question is already in there. Although I truly
  3014. love  to  hear  from  you and will do my best  to  help,  the
  3015. problem  is  that each day between 30 and 50 E-mail  messages
  3016. arrive  here,  and  you are talking to a one-man,  spare-time
  3017. company!  As it is I'm spending  2-3 hours a day on answering
  3018. E-mail  and  that is about as much as I have  to  spare.  The
  3019. easiest  way  to  get  in touch with me is  via  E-mail.  The
  3020. address is:
  3021.  
  3022.      RB5@acpub.duke.edu
  3023.  
  3024. The Cat Soft Web site can be found at:
  3025.  
  3026.      http://www.cat-soft.com
  3027.  
  3028. Regular  mail  should  work as well, but  might  take  a  bit
  3029. longer. My address for this is:
  3030.  
  3031.      Rob Beckers
  3032.      210 Alexander Ave., Apt. D
  3033.      Durham, NC 27705
  3034.      USA
  3035.  
  3036.  
  3037. 4.1 Serv-U Mailing List
  3038. -----------------------
  3039. There is also a WWW mailing list for Serv-U where you can ask
  3040. questions and discuss Serv-U related topics. To subscribe  to
  3041. the Serv-U mailing list, send an E-mail message to:
  3042.  
  3043.      list@corridor.com
  3044.  
  3045. with  only  a  single line in the message body, which  should
  3046. read:
  3047.  
  3048.      subscribe Serv-U
  3049.  
  3050. This  will  return a message from the list manager  within  a
  3051. minute  or  so, explaining in detail how to post messages  to
  3052. the  list and related matters. I am also subscribed  to  this
  3053. list,  so each message you post will reach my E-mail  box  as
  3054. well.  When needed I'll respond to your message, but my  hope
  3055. is  that others will reply to, thus cutting down a bit on the
  3056. flood of messages I have to answer each day.
  3057.  
  3058. If  you want to look through previous postings to the mailing
  3059. list   (an  invaluable  source  of  information  for  solving
  3060. problems), please take a look at:
  3061.  
  3062.      http://www.pacemail.com/hyper/
  3063.  
  3064. 4.2 Reporting Bugs
  3065. ------------------
  3066. Nothing  in  this world is perfect, least of  all  me!  Alas,
  3067. chances are that despite careful testing you'll still find  a
  3068. bug.  Please don't think others will report it, let me  know!
  3069. There  are  a few things I need to know in order  to  improve
  3070. chances of fixing the beastie, so take note of the following:
  3071.  
  3072.    * Most  important: Can you get the same bug  to  appear  by
  3073.      repeating  certain actions? Please try hard;  without  a
  3074.      recipe  for repeating a bug, it's going to be very  hard
  3075.      to track it down.
  3076.    * What  TCP/IP  and WinSock stack are you using? Brand/type
  3077.      and  version  number please. What operating system  (DOS
  3078.      version  and Windows or Windows-For-Workgroups,  Windows
  3079.      95,  NT  version x.xx)? Any memory manager (QEMM  etc.),
  3080.      what version?
  3081.    * Please  indicate also if this bug is merely  cosmetic  or
  3082.      of  vital  importance  for using  Serv-U.  Somewhere  in
  3083.      between  is  possible as well of course. By the  way,  I
  3084.      consider security related bugs very important!
  3085.    * Finally,  please give me a chance to fix  a  bug,  before
  3086.      you  start to shout all over the Internet how  bad  this
  3087.      program is . . .
  3088.      
  3089. 4.3 Registering Serv-U
  3090. ----------------------
  3091. If  you're happy with the performance of Serv-U, then  please
  3092. make me happy and register this program! Just a few words for
  3093. those  who  are in doubt: Making this program took  me  (very
  3094. literally)  many  months of work, spread out  over  the  last
  3095. three years. Your registration fee is going to motivate me to
  3096. continue  improving  Serv-U.  In  general,  registration   is
  3097. important  for shareware programs: It makes it  possible  for
  3098. you to use professional quality software for peanuts. Lastly,
  3099. being  a  biomedical engineering graduate  student,  I'm  not
  3100. exactly making lots of $$'s (to put it mildly). So, those  25
  3101. bucks for registration mean a lot to me!
  3102.  
  3103. What  do  you  get if you register? As soon  as  I  get  your
  3104. registration   I'll  send  you  a  registration   code   plus
  3105. instructions  on  how  to add it to the  program.  This  will
  3106. enable  you  to  use  the program after the  30  day  try-out
  3107. period. Please let me know your E-mail address, since  Serv-U
  3108. is  tailored to pick the registration key out of  the  E-mail
  3109. message  I will send you. In case I have your E-mail  address
  3110. you'll  also  get  notified  when  there  are  updates.  Once
  3111. registered  you'll get those updates for free. That  is,  you
  3112. can use the same registration code on the updates, but you'll
  3113. have  to  get them yourself. Apart from all this you'll  also
  3114. get the nice, warm feeling of having contributed to improving
  3115. my earthly wealth!
  3116.  
  3117. The  registration code is tied to the user/company  name  you
  3118. specify on the registration form. You can see if your  server
  3119. is  registered  by  looking at the  'About'  dialog  box:  If
  3120. registered it will tell you to whom. Another thing to keep in
  3121. mind is that the registration information is sent back to any
  3122. FTP  client who uses the FTP command 'HELP'. This  is  not  a
  3123. much  used command but in principle it allows the whole world
  3124. to  find out who paid for your copy of Serv-U. If you're  the
  3125. lawful owner of the server this shouldn't bother you, if not.
  3126.  
  3127. The  registration fee is $25 for each copy. If  you  want  to
  3128. make  me  even happier and need several copies, the following
  3129. license prices apply:
  3130.  
  3131.      The FTP Serv-U license prices:
  3132.      
  3133.        1-9  $25 per copy
  3134.      
  3135.      License for:
  3136.        20   $250
  3137.        50   $500
  3138.        100  $700
  3139.        100+ $500 per block of 100 copies
  3140.      
  3141.      Licenses for more than 500 copies are negotiable.
  3142.      Educational discount: For licenses of 50 or more copies:
  3143.      30% discount.
  3144.  
  3145. The  'number of copies' in the above refers to the number  of
  3146. concurrently  running Serv-U FTP servers in your organization
  3147. (i.e.  it  is  independent of the number  of  concurrent  FTP
  3148. clients).  The  last page of this manual is the  registration
  3149. form. Please use this form for all registrations! That way  I
  3150. can keep my administration manageable.
  3151.  
  3152. 4.4 Registration in the US
  3153. --------------------------
  3154. To   register  from  within  the  US,  please  fill  out  the
  3155. registration  form  and send it along  with  payment  to  the
  3156. address  on  the  form. A (personal) check made  out  to  Rob
  3157. Beckers is the preferred form of payment, but a Postal  Money
  3158. Order,  or  Purchase  Order is welcome too.  If  you  need  a
  3159. receipt,  then  please mention this on the registration  form
  3160. and I will send you one by paper mail. It is also possible to
  3161. register via CompuServe's SWREG service. The registration  ID
  3162. for  that  is  7743 and this costs $30 (Since CS  takes  $5).
  3163. Credit cards are welcome too! Accepted are Visa, Master Card,
  3164. Novus/Discovery, and American Express. I'm working on on-line
  3165. registration, but meanwhile you can either send me  the  card
  3166. number  and  expiration date by E-mail  (please  include  the
  3167. registration  form),  or drop me a line  asking  for  my  fax
  3168. number, so you can call the details in.
  3169.  
  3170.                        Important Note:
  3171.                        ===============
  3172. Make sure to include the registration form with whatever you
  3173.   send me!! I'm receiving way too many checks and purchase
  3174. orders without a form, often even without a name nor a phone
  3175.  number. If your order goes through a purchasing department
  3176. then please make sure they include the registration form with
  3177.                       the PO or check!
  3178.  
  3179. 4.5 Registration from Abroad
  3180. ----------------------------
  3181. While  borders are disappearing in many parts of  the  world,
  3182. getting  money across from one  country to another  is  still
  3183. not  easy, at least not when you want to keep the cost  down.
  3184. Below is a list of payment options that I accept (in order of
  3185. preference).  Please  make sure to include  the  registration
  3186. form with anything you send me.
  3187.  
  3188. By  far the easiest way to get money across the borders is by
  3189. credit card. Accepted are Visa, Master
  3190. Card,   Novus/Discovery   and   American   Express.   On-line
  3191. registration  is in the works, but meanwhile you  can  either
  3192. send me the card number and expiration date by E-mail (please
  3193. include the registration form), or drop me a line asking  for
  3194. my fax number, so you can call the details in.
  3195. Other payment options for registration from abroad are:
  3196.  
  3197.      * Using CompuServe's SWREG service. The registration ID
  3198.        for Serv-U is 7743 and registration costs $30 this way (CS
  3199.        takes $5, so I end up with $25).
  3200.      * By check, drawn at an American bank and in US dollars.
  3201.        The check should be made out to Rob Beckers.
  3202.      * By American Express Travelers Checks for the correct
  3203.        amount in US dollars. These are cheap and safe, but there
  3204.        might be a minimum commission charged by your bank. The
  3205.        checks should be made out to Rob Beckers and don't forget to
  3206.        sign them twice!
  3207.      * By Postal Money Order. As I understand it, you can buy
  3208.        these international money orders in most countries for very
  3209.        little money ($3 here in the US). Payment is in your own
  3210.        currency, but the money order should be made out for US $25
  3211.        and to Rob Beckers.
  3212.      * By cash, but only in US dollars and I give no guarantees
  3213.        about safe arrival! Please do not send me other currencies,
  3214.        it would probably cost me much more to convert them to US
  3215.        dollars than it will cost you. A trick I found useful for
  3216.        sending cash in envelopes: put the money in a folded sheet of
  3217.        paper so it doesn't shine through the envelope. This might
  3218.        improves chances of arrival considerably.
  3219.      * For the Dutch: Het is ook mogelijk te betalen door fl.
  3220.        40 over te maken op girorekening 53.95.461 t.n.v. Rob Beckers
  3221.        te Bunde. Stuur dan wel even het registratie formulier per E-
  3222.        mail  naar mij toe. S.v.p. geen geld vanuit Belgie  of
  3223.        Duitsland rechtstreeks overmaken, want daarvan blijft niet
  3224.        veel over!
  3225.      * For Canadians only: By any type of (personal) bank check
  3226.        of Canada. Just make the check out in US dollars. Doing so is
  3227.        easy: Write "US" in front of the dollar sign and add "US
  3228.        Funds" below the sum. This way neither of us pays anything
  3229.        extra (I don't, and as far as I know you don't either, but
  3230.        check with your bank if you want to make sure). The check
  3231.        should be made out to Rob Beckers.
  3232.      * By direct money transfer in US dollars to my American
  3233.        bank account. Please add $13 extra, since that is the fee my
  3234.        bank charges me to receive money this way. Please send me the
  3235.        registration form by E-mail in this case. The details for a
  3236.        wire transfer are:
  3237.  
  3238.           Bank:
  3239.                Wachovia
  3240.                Durham - North Carolina
  3241.           ABA/Routing no:
  3242.                053100494
  3243.           Account:
  3244.                No. 2373193064
  3245.                Rob Beckers
  3246.                210 Alexander Ave., Apt. D
  3247.                Durham, NC 27705
  3248.                USA
  3249.  
  3250.  
  3251. ******************** REGISTRATION FORM **********************
  3252.  
  3253. ROB BECKERS
  3254. 210 Alexander Ave., Apt. D
  3255. Durham, NC 27705
  3256. U.S.A.
  3257.  
  3258.                               
  3259.                               
  3260.                      REGISTRATION FORM SERV-U
  3261.                      ========================
  3262.  
  3263.  
  3264.            Name: ............................................
  3265.  
  3266.    Company Name: ............................................
  3267.  
  3268.         Address: ............................................
  3269.  
  3270.                  ............................................
  3271.  
  3272.                  ............................................
  3273.  
  3274.    Phone Number: ............................................
  3275.  
  3276.  E-Mail Address: ............................................
  3277.                   (Important! Reg. Code is sent by E-mail)
  3278.   No. of copies: .........
  3279.  
  3280. Additional comments, suggestions, complaints, praise, etc .
  3281.  
  3282. .............................................................
  3283.  
  3284. .............................................................
  3285.  
  3286. .............................................................
  3287.  
  3288. Registration fee is $25 per copy. Send this order form  along
  3289. with your payment to: Rob Beckers, 210 Alexander Ave. Apt. D,
  3290. Durham NC 27705, USA.
  3291.  
  3292. If   you  have any questions, comments or suggestions  please
  3293. contact  Rob  Beckers at the above address or via  e-mail  to
  3294. RB5@acpub.duke.edu. Check out the site license prices in  the
  3295. manual if you need multiple copies.
  3296.  
  3297. As  this software is shareware it comes `as is', there is  no
  3298. warranty  implied  or  otherwise, nor  is  support  provided.
  3299. However, if you discover any bugs or problems please  contact
  3300. the developer at the above e-mail address.
  3301.